0

Spending several hours to tackle this, completely exhausted and see no solution any more. Do hope for some help here. Code 1 no problem. Code 2 throws error Field niveau has three items. all throw error.

The form you submitted contained the following errors

Invalid Selection
Invalid Selection
Invalid Selection

In a form this code:

Code 1

<ul class="forms-inline-list">
                 {options:gender_{language_code}}
            <li>
        <input type="radio" id="gender_{language_code}" name="gender_{language_code}[]" value="{option_value}"{checked}>
        <label for="checkbox">{option_value}</label>
            </li>
                {/options:gender_{language_code}}
               </ul>    

code 2

<ul class="forms-inline-list">
                 {options:niveau_{language_code}}
            <li>
        <input type="radio" id="niveau_{language_code}" name="niveau_{language_code}[]" value="{option_value}"{checked}>
        <label for="checkbox">{option_value}</label>
            </li>
                {/options:niveau_{language_code}}
               </ul> 

I swear, the two fields are the same, except for the name.

What is going on here?

Thanks a lot for saving may days.

0

Related to feel stupid, but, how code checkbox in form?

Chris Barret from Mightybigrobot (makers of Cartthrob abd Profile:edit) helped me out. The brackets have to go in a checkbox or radio select field. Working code is

<ul class="forms-inline-list">
                 {options:gender}
            <li>
        <input type="radio" id="gender" name="gender" value="{option_value}"{checked}>
        <label for="checkbox">{option_value}</label>
            </li>
                {/options:gender}
               </ul>    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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