Form Builder (FormBuilder) - Adding Static Text with a wysiwyg editor

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
lucid
Forum Members
Forum Members
Posts: 29
Joined: Mon Nov 12, 2007 2:48 pm

Form Builder (FormBuilder) - Adding Static Text with a wysiwyg editor

Post by lucid »

I'm using FormBuilder to create a new form but there are a couple of places that need some static text.

There is an option to add a "Static Text" but there is no wysiwyg editor to style text. Actually I played around a little more before posting and logged in as an admin user (previously logged in as an editor) and there is now a wysiwyg editor.

Does anyone know which permission I have to check to turn the wysiwyg editor for other groups?


Thanks.
lucid
Forum Members
Forum Members
Posts: 29
Joined: Mon Nov 12, 2007 2:48 pm

Re: Form Builder (FormBuilder) - Adding Static Text with a wysiwyg editor

Post by lucid »

So I poked around the code for a little white to try and shed some light on to the WYSIWYG editor and found a like in the StaticTextField.class.phh files (modules/FormBuilder/Classes folder) which reads:

$mod->CreateTextArea((get_preference(get_userid(), 'use_wysiwyg')=='1'), $formDescriptor,  $this->GetOption('text',''), 'fbrp_opt_text','pageheadtags'))

The function below determines whether or not a WYSIWYG editor is used:
get_preference(get_userid(), 'use_wysiwyg')=='1')

So I searched for 'use_wysiwyg' and it appears in the edituser.php file (admin/ folder):
$use_wysiwyg = "";
line: 75    #if (isset($_POST["use_wysiwyg"])){$use_wysiwyg = $_POST["use_wysiwyg"];}
line: 76    #else{$use_wysiwyg = get_preference($userid, 'use_wysiwyg');}

and

line: 105  #set_preference($userid, 'use_wysiwyg', $use_wysiwyg);
line: 106  #audit(-1, '', 'Edited User');

All of these are commented out so I don't really understand how a non-admin account can use a WYSIWYG editor unless you hack the file. [which I have done now but i'm looking for a better way - $mod->CreateTextArea(ture, $formDescriptor,  $this->GetOption('text',''), 'fbrp_opt_text','pageheadtags')) ]

Any ideas?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Form Builder (FormBuilder) - Adding Static Text with a wysiwyg editor

Post by Dr.CSS »

Have you looked into the permissions for Editor, out of the box they have a lot of permissions unchecked...
lucid
Forum Members
Forum Members
Posts: 29
Joined: Mon Nov 12, 2007 2:48 pm

Re: Form Builder (FormBuilder) - Adding Static Text with a wysiwyg editor

Post by lucid »

I tried to work out which permission would turn this feature on before I went into the code but I couldn't work out which one it was. I opened up 2 browser windows and compare the admin group with the editor group but still no luck.

Was wondering if anyone knew which setting it was.
Post Reply

Return to “Modules/Add-Ons”