I've been scouring the forum, and can find topics close to what I'm trying to do but not close enough for me to fill in the gaps. I'm using a read_data to pull data from a table. The debugger shows the results I want.
The form is a survey where users identify areas they want to volunteer. I've got that working. I want to create a multi-page form that has that in the first page. After submitting the first page. the second page would pull up just the options that the user checked, and allow him/her to check an additional box to indicate in three of those records to show which are their top three preferences.
My challenge is loading the selected options into a CF6 form to allow the user to update.
Thanks in advance!
The form is a survey where users identify areas they want to volunteer. I've got that working. I want to create a multi-page form that has that in the first page. After submitting the first page. the second page would pull up just the options that the user checked, and allow him/her to check an additional box to indicate in three of those records to show which are their top three preferences.
My challenge is loading the selected options into a CF6 form to allow the user to update.
- If I have several records, what action do I use to actually display? It doesn't seem that the repeater makes sense, unless I use a count of the records to set the multiplier.
- How do I load a value into a field? I've tried every variation of {var:blahblah} I can think of .... {var:model.fieldname}, {var:model.[n].fieldname}, {var:fieldname}, etc. etc. All lead to a blank in the field.
Thanks in advance!
Step 1 : Always include a debug action at the end of your event (so after the section is displayed, after all your data reads etc - that way you can very easily see all the data and how it's structured.
To put a read value into a field :
For the repeater area:
In "data provider" put {var:read_data#} (obviously, replace the # with the right number for your read data action). All the data will now be available in {var:repeater_area#.row}
So if you want a checkbox in each repeater that when checked sends the id of the row, you would use as the value
For your purposes I probably wouldn't bother calling a CCv6 connection from within your form unless you need to display more information and you want it in a table.
And what that "all the parameters are available blahblah" means is that for example if you do a read_data in your chronoforms and then call a CCv6 connection after it, the data from that read_data# will be available for use in the connection too.
To put a read value into a field :
{var:read_data#.model.field}
For the repeater area:
In "data provider" put {var:read_data#} (obviously, replace the # with the right number for your read data action). All the data will now be available in {var:repeater_area#.row}
So if you want a checkbox in each repeater that when checked sends the id of the row, you would use as the value
{var:area_repeater#.row.model.field}
For your purposes I probably wouldn't bother calling a CCv6 connection from within your form unless you need to display more information and you want it in a table.
And what that "all the parameters are available blahblah" means is that for example if you do a read_data in your chronoforms and then call a CCv6 connection after it, the data from that read_data# will be available for use in the connection too.
Thanks HealyHatMan. I'm a step further, but still can't successfully put values into the fields, so I'm still missing or misunderstanding something. Here's where I am in a test form:
Read_data4 has a model called tester, pulling in aid and email.
Here is the repeater setup:

Here's a field in the repeater body:

Here is the debugger:

The result remains blank fields:
Read_data4 has a model called tester, pulling in aid and email.
Here is the repeater setup:

Here's a field in the repeater body:

Here is the debugger:

The result remains blank fields:

have another read of what I wrote under repeater area. Code section
Thanks! I did, and I also saw that I needed to use area_repeater# instead of repeater_area#, but that got it.
This topic is locked and no more replies can be posted.