Buy Now
Sign in

Multiplier fields data - clarifications required

CrystalFrontier , August 16 at 12:28
C
CrystalFrontier
Hello!
I am using four mulitplier containers and I would like to see the data somehow.
For the time being, I'd be very happy to just have the data shown in an e-mail. First question: Is it required to actually save the data to a DB when it comes to multiplier fields? I currently have no db save action in place. For the other (static) data, I know that it is not needed (they show up in e-mail).
Three of my four containers feature three types of info. Example:
Field titles:
debaters[##][debater_name]
debaters[##][debater_gender]
debaters[##][debater_status]
...although it's indicated not use special characters in feild titles (like [ and #). That's confusing but I can only read the tutorial as such:
Better is to use shirt[##][style],shirt[##][size]and shirt[##][colour]. This will group each shirt together and assing the shirt sub-array which is probably the most useful arrangement.
But I use underscores for field ID respectively, right?
So, how would I feature the information in the e-mail? The Q&A suggests:
{repeater:text}
{data}
{/repeater}
Since the code is not coherent with the shirt example in the same article, I can't discern which part I need to replace with what. I've tried various combinations but still can't see data. I have switched to 'custom' template generation in the e-mail action.
Should it feature the filed name or field ID somewhere? My understanding is, that it should be the field IDs.

​Thanks for any help!​
​Christopher
GreyHead
Hi Christopher,
First, It is not required to save any data unless you need to refer back to it later.
Second, the FAQ was written for CFv5 and the Repeater in CFv6 isn't quite the same.
The Field names like debaters[##
  • [debater_name] are array names - hence the
  • ; and the ## is replaced in CFv5 by the sequence number of the repeater, 1, 2, 3, etc. In this particular case both the [] and ## are valid.
    You care quite correct that you can't use array names for element ids so they become debaters_##_debater_name where again the ## is replaced by the sequence number.
    If you add a Debugger action in the On Submit event of the form you can see the names and values of the data being submitted. That should help you tweak the element names to get the result that you want.
    Bob
    ChronoForms technical support
    If you'd like to buy me a coffee or two, thank you very much
    C
    CrystalFrontier
    Hello GreyHead
    Thanks for the reply, So, I did get the principle right, then However, the repeater code I quoted earlier is clearly marked as a CFv5 tutorial. Where' s my thinking mistake?
    https://www.chronoengine.com/faqs/70-chronoforms/cfv5/5245-how-can-i-use-the-multiplier-in-cfv5
    As far as I can tell, I figured out through the debugger how to fill the curly brackets for e-mail content. However, it shows me an error message where I honestly don't see one. I assume it's marked as item [10]
    debugger_2.png
    The following body of the e-mail template is just the standard HTML, but all info seems to be in place. However, is there way to clean up the info items in a way that just the info content is visible? It's supposed to go out to the people signing up as well.
    debugger_3.png
    Thank you again! I did in fact get one step further
    Christopher
    Attachments
    debugger_2.png
    debugger_2.png
    (24.96 KiB)
    34 Downloads/Views
    debugger_2.png
    debugger_2.png
    (24.96 KiB)
    48 Downloads/Views
    debugger_3.png
    debugger_3.png
    (22.37 KiB)
    48 Downloads/Views
    C
    CrystalFrontier
    Hello again,
    you can ignore the part about how to clean up the data. I did, then, use the repeater function. Works like a charm!!
    <tr><td>Debaters info</td><td>{repeater:debaters}{deb_name}, {deb_gender}, {deb_status} | {/repeater}</td></tr>​
    ​<tr><td>Judges info</td><td>{repeater:judges}{judge_name}, {judge_gender}, {judge_experience} | {/repeater}</td></tr></td></tr>​
    ​<tr><td>Observers info</td><td>{repeater:observers}{observer_name}, {observer_gender} | {/repeater}</td></tr></td></tr>
    tranlates into mail content:
    mail_content_1.png
    Thanks for your help!
    I really enjoy the patience displayed and the high success rate of this forum!
    Until my next issue, then
    Christopher
    Attachments
    mail_content_1.png
    mail_content_1.png
    (5.75 KiB)
    48 Downloads/Views