Hi
I've got a really easy question, but I can't find the answer...
I've used Formbuilder to make a form. It's just two text inputs - name and email.
I want to change the size of the text inputs from 25 (the default) to something else. The Formbuilder help file says...
"Text Input. This is a standard text field. You can limit the length, and apply various validation functions to the field."
...but doesn't tell you how.
Can anyone point me in the right direction?
Many thanks
Jo
change size of form's text input
Re: change size of form's text input
Of the two items you have bolded, the MAXLENGTH is controlled from the user interface within the Formbuilder fields--use the maxlength box on the Main tab of each field to set this size. This only increases how many characters a user may enter in the input box, however.jocando wrote: I want to change the size of the text inputs from 25 (the default) to something else. The Formbuilder help file says...
"Text Input. This is a standard text field. You can limit the length, and apply various validation functions to the field."
...but doesn't tell you how.
The SIZE, the other item you bolded, is controlled within the module itself. You will need to edit the file
/modules/Formbuilder/classes/TextField.class.php, starting on line 48 in Formbuilder 0.6.3, where you will see the following:
Code: Select all
return $mod->fbCreateInputText($id, 'fbrp__'.$this->Id,($this->Value?$this->Value:$this->GetOption('default')),$this->GetOption('length')<25?$this->GetOption('length'):25, $this->GetOption('length'),
($this->GetOption('clear_default','0')==1?(' onfocus="if(this.value==this.defaultValue) this.value=\'\';" onblur="if(this.value==\'\') this.value=this.defaultValue;"'):' ').$js.$ro.$this->GetCSSIdTag());
Pat
Re: change size of form's text input
This is actually very easy to do with CSS, I do it all the time, the hard coded stuff is just if you don't have CSS controlling it it will be that size...