0

I have two fields on an older site in EE 1.6.7. I am completely rebuilding the site in EE2, but in the meantime, they have a field I need help with. There are two fields in the entry that are both FF Multi-select fields. One lets them select which fields will be in the lead capture form. The other is to let them select which fields are required. Both fields have the same selections available: First Name, Last Name, E-mail, Phone Number. The fields name is {landing_form_form_fields} and the required field is {form_field_requirements}. I looked for the docs on the old FF Multi-select field but couldn't find anything. Is it possible to nest them like this or do I need to rebuild this somehow?

Inside the form, was this:

{landing_form_form_fields}
    {if "{option_name}" == "First Name"}
        <label for="firstName">{form_field_requirements}{if "{option_name}" == "First Name - Required"}* {/if}{/form_field_requirements}First Name</label>
        <input id="firstName" name="firstName" type="text" />
    {/if}
    {if "{option_name}" == "Last Name"}
        <label for="lastName">{form_field_requirements}{if "{option_name}" == "Last Name - Required"}* {/if}{/form_field_requirements}Last Name</label>
        <input id="lastName" name="lastName" type="text" />
    {/if}
    {if "{option_name}" == "E-mail"}
        <label for="email">{form_field_requirements}{if "{option_name}" == "E-mail - Required"}* {/if}{/form_field_requirements}E-mail</label>
        <input id="email" name="email" type="text" />
    {/if}
    {if "{option_name}" == "Phone Number"}
        <label for="phone">{form_field_requirements}{if "{option_name}" == "Phone Number - Required"}* {/if}{/form_field_requirements}Phone Number<span class="right">XXX-XXX-XXXX</span></label>
        <input id="phone" name="phone" type="text" />
    {/if}
{/landing_form_form_fields}
3
  • 1
    Mr Mallett - long time no speak :-) iirc option_name wasn't available in FF Select. Trevor had written an article a while back about this kind of form building tool trevordavis.net/blog/… - you may get some mileage out of it Aug 20, 2013 at 16:00
  • {option_name} comes in fine for the selected fields, but I can't loop through the {form_field_requirements} multi-select while already in the other. :) It currently just writes the fields selected. It does nothing for the "requirements".
    – W3bGuy
    Aug 20, 2013 at 16:09
  • Steven, If you want to apply your solution, I will gladly accept it as the answer. I ended up using that little golden nugget and rebuilding a few things to work with that. Thanks again.
    – W3bGuy
    Aug 22, 2013 at 16:56

1 Answer 1

0

Trevor Davis had written an article a while back about this kind of form building tool http://trevordavis.net/blog/freeform-fieldframe-expressionengine-form-builder - you may get some mileage out of it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.