[TYPO3-english] Formhandler and validating generic radio buttons

Michael Lykke typo3 at lykke-it.dk
Thu May 17 18:40:23 CEST 2012


On 17-05-2012 17:50, Reinhard Führicht wrote:
> Hi Michael,
>
> Am 17.05.2012 16:12, schrieb Michael Lykke:
>>
>> I create the field in step1.html like this:
>> ###master_radio-yesno_question1###
>>
>> Which generates this markup:
>> <div class="type-check">
>> <label for="radio-yesno-question1-yes">Some question? </label>
>> <div>
>> <input type="radio" id="radio-yesno-question1-yes"
>> name="form-multistep[radio-yesno-question1]" value="Yes">
>> <label for="radio-yesno-koncert-yes">Yes</label>
>> </div>
>> <div>
>> <input type="radio" id="radio-yesno-question1-no"
>> name="form-multistep[radio-yesno-question1]" value="No">
>> <label for="radio-yesno-question1-no">No</label>
>> </div>
>> </div>
>>
>> And validating it like this:
>> 1.validators {
>> 1.class = Validator_Default
>> 1.config.fieldConf {
>> question1.errorCheck {
>> 1 = required
>> }
>> }
>> }
>>
>> Can anyone help, please?
>
> If the generated field has the name "radio-yesno-question1" shouldn't
> the validator config look like this?
>
> 1.validators {
> 1.class = Validator_Default
> 1.config.fieldConf {
> radio-yesno-question1.errorCheck {
> 1 = required
> }
> }
> }
>
> Regards,
> Reinhard

Yes! Of course! Thank you so much - this was driving me insane. Now I 
just need to adjust the error message labels.

Thanks again,
Michael


More information about the TYPO3-english mailing list