i2-Services, Inc. Forums

Full Version: How do I make this
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hmm good call... could insert javascript to do field checking.
Just to update this forum thread, i2 & David worked together with PHP Form to e-Mail & achieved the desired function(s).
This existing thread seemed to fit what I need, so I am posting here. I hope this is okay to use someone else's thread.

I need some of my form fields to appear side by side on the webpage. If I was designing my own form this would be a snap with a table, but I don't know how to do it without messing with the if/then statements that affect all fields. Do you have some suggestions on how to modify the "html_form.php" template to allow for 3 specific fields to appear on the same line?

Let me know if you need more info about the specific fields. They are 2 text fields and 1 text area field.

Thanks for the great support!

Brian
Hoping that they all fix within your content areas width, try for example (this is for the first page):

Code:
{if $page == "1"}
   <input type="text"  name="x_field_name" value="{$smarty.session.f2e_x_field_name}" size="10"> &nbsp;
   <input type="text"  name="x_field_name2" value="{$smarty.session.f2e_x_field_name2}" size="10"> &nbsp;
  <textarea name="x_field_name3" cols="30" rows="5">{$smarty.session.f2e_x_field_name3}</textarea>
{/if}


You then call the variables within the backend via that $x_fieldname1 to $x_fieldname3

You may need to add in table properties that you're using.

You want to place this section of code above the form field code/loop. Should be a comment tag where that
starts that reads:

<!----------- HTML FORM QUESTION CODE BELOW ----------->

Submit a support ticket before or after trying this as I need to give you 2 patched files to have this
handled 100% correct.

Brian,

I just tested the code above and it worked perfectly!

Good stuff, being that I didn't test it before submitting the reply.
See the attached screen shot.

The first 4 fields (radio / text / text / textarea) are all manually entered into the template.

The rest under those fields were entered via the back-end.
Code for keeping a radio button checked / selected:

Code:
<input type="radio" name="x_radio" value="yes" {if $smarty.session.f2e_x_radio == "yes"}checked{/if}>Yes<br>
<input type="radio" name="x_radio" value="no" {if $smarty.session.f2e_x_radio == "no"}checked{/if}>no<br>

i2-Services, Inc. Wrote:
Brian,

I just tested the code above and it worked perfectly!

Good stuff, being that I didn't test it before submitting the reply.


Good to hear! I will give it a try and let you know via support ticket.

Pages: 1 2
Reference URL's