Forums

Generate n Multi Field automatically

Kenjy-15 20 Dec, 2016
Hello everybody,

I have a form (multipage) to enter information on biological samples. The user select a "number of total sample" and click on "Add" button. An other page is display with multi field for one sample.
I would like to display n multi field with n is the "number of total sample" entered before.

How can I say to CF: The value of total sample number is 5 (it's an example), display 5 multi fields ?

I don't want to use multiplier because there is no limit to add fields, and I want to display only the number of fields corresponding to the total number sample.

I hope to be understandable.
Max_admin 21 Dec, 2016
Answer
Hi Kenjy,

You will need a custom code field to do this, with a for loop, but you will have to use your own field or multifield HTML code.

You can get the value of the samples (or any field) using $form->data["field_name"]

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.