Dynamic Field Validation

Schmoe 25 Nov, 2015
Hello Chronoforms Community,

i know to this topic was mentioned several times before and i've read all of them, but all the solutions does not seem to work with Chronoforms 5 in Joomla.
The functions formCheck oder formCheck_RegistrierungMitglieder (RegistrierungMitglieder is the name of my form) does not exist.

In our form is a function to add more fields. I made a function with simply clone the fields that are able to be duplicated. The source elements looks like this:

<select name="umgesetzteMassnahme[0]" id="umgesetzteMassnahme" size="0" class="validate['required'] form-control A" title="" style="" data-load-state="" data-tooltip=""></select>


<textarea name="leistungBeschreibung[0]" id="leistungBeschreibung" placeholder="" rows="3" cols="40" class="validate['required'] form-control A" title="" style="" data-wysiwyg="0" data-load-state="" data-tooltip=""></textarea>


In the cloning process i add a suffix to the "id" and increment the array in the "name" attribute. It's all working fine except the validation.

I've read multiple tutorials, but they all seem not to work with Chronoforms5 or i do something wrong. So my question is, how to enable validation for the duplicated fields? I've seen in the code that it uses gvalidate, but i dont get it to work with my new fields.

I hope u guys can give me a quick tip on how to do it.

Thanks in advance.
GreyHead 25 Nov, 2015
Hi Schmoe,

CFv5 has a multiplier built in and it appears to support validation when I test. If I understand correctly you are not using that - I suggest that you try it as it is easier than creating your own code. Please see this FAQ

Bob
Schmoe 25 Nov, 2015
Hi GreyHead,

thank you for your quick response. I will get it working with it.
Schmoe 26 Nov, 2015
Hello again,

I figured it out how to set up the multiplier elements. Now, I need to save it to the database. But I dont know how to save the multiplier fields into the extra table with the foreign key. How is it done with Chronoforms 5?

Unfortunately the little description in the FAQ above is not detailed enough for me.

Thanks for your help.
GreyHead 26 Nov, 2015
Hi Schmoe,

Please drag a Debugger action into the On Submit event, then submit the form and post the results here so that I can see the form of the data you need to save

Bob
This topic is locked and no more replies can be posted.