PDA

View Full Version : Form Builder v1.1.3 - Form Layout


WormBaby
10-26-2005, 01:09 AM
I think it would be cool to have the form layout changeable for each form in the Form Builder plugin. Since this isn't a current option I just changed a few things to get the layout of the FIELD NAME, FIELD LABEL, and FIELD TYPE to be are all on their own table rows. Then added some breaks and a horizontal line between each item.

The result looks like:
What is your Name? <-- FIELD NAME
(type your first name only) <-- FIELD LABEL
|___user_input_text_box___| <-- FIELD TYPE
___________________________________

How I did it. Open the formbuilder.php file and edit the following lines of code to:

Lines 254 to 257
254 echo &#39;&#60;tr&#62;
255 &#60;td&#62;&#39; . &#036;field&#91;&#39;name&#39;&#93; . &#39;&#60;/td&#62;&#60;/tr&#62;
256 &#60;tr&#62;&#60;td&#62;&#60;i&#62;&#39; . &#036;field&#91;&#39;label&#39;&#93; . &#39;&#60;/i&#62;&#60;/td&#62;&#60;/tr&#62;
257 &#60;tr&#62;&#60;td&#62;&#39;;
Lines 289 to 293
289 echo &#39; &#60;/td&#62;&#60;/tr&#62;
290 &#60;tr&#62;&#60;td&#62;
291 &#60;br&#62;&#60;hr&#62;&#60;br&#62;
292 &#60;/td&#62;
293 &#60;/tr&#62;&#39;;

It would be nice if there was an option to choose different layouts for each form in a future version of Form Builder. Till that day I&#39;m cool with this.