Hey,
I am trying to set the result of the a checkbox in the mail sent to the user.
I read that I need to put the 'arrayhandler' in front of the email, but in CF6 there is no arrayhandler?
I can get the variable from the $_POST, but this does not work in the mail (works on the confirmation page though)
Any help?
Kr
W
I am trying to set the result of the a checkbox in the mail sent to the user.
I read that I need to put the 'arrayhandler' in front of the email, but in CF6 there is no arrayhandler?
I can get the variable from the $_POST, but this does not work in the mail (works on the confirmation page though)
Any help?
Kr
W
Hi W,
This is a "checkbox" or a "Checkboxes group" ?
what do you have in the email body and what do you get in the email exactly ?
Best regards,
Max
This is a "checkbox" or a "Checkboxes group" ?
what do you have in the email body and what do you get in the email exactly ?
Best regards,
Max
Hey Max,
It concerns a checkbox group. What I did is just use the form "Fields Events", that you can use as a template when creating a new form.
There are two checkboxes groups.
In the body of the mail I have defined the following:
"
Testing checkboxes
{data:checkboxes2[]}
"
In the actual body of the mail I have just
"
Testing checkboxes
"
Kr
W
It concerns a checkbox group. What I did is just use the form "Fields Events", that you can use as a template when creating a new form.
There are two checkboxes groups.
In the body of the mail I have defined the following:
"
Testing checkboxes
{data:checkboxes2[]}
"
In the actual body of the mail I have just
"
Testing checkboxes
"
Kr
W
Hi W,
You can't use the brackets in the {commands}, please use this:
{data:checkboxes2}
Best regards,
Max
You can't use the brackets in the {commands}, please use this:
{data:checkboxes2}
Best regards,
Max
Seems to work.
Maybe you can update the example (for the default contact form) to include this.
Another question, is there another way to get these values rather then the {} notation?
Thing is that this is not formattable, so if I want to create a formatted mail, I will not be able to put the answers on a seperate line for example.
Anyway allready tanx for the swift and rapid response !
Kr
W
Maybe you can update the example (for the default contact form) to include this.
Another question, is there another way to get these values rather then the {} notation?
Thing is that this is not formattable, so if I want to create a formatted mail, I will not be able to put the answers on a seperate line for example.
Anyway allready tanx for the swift and rapid response !
Kr
W
Hi W,
Thank you, I have updated the form for the next update.
The {} notation returns the value, you can place it inside HTML tags and it will be formatted, or what are you trying to achieve exactly ?
Best regards,
Max
Thank you, I have updated the form for the next update.
The {} notation returns the value, you can place it inside HTML tags and it will be formatted, or what are you trying to achieve exactly ?
Best regards,
Max
Well,
I am sending a confirmation email with the answers filled in.
Currently it looks like this :
"Reden van aanvraag:["gedagvaard","procedure"]"
Would be nicer if I could do something like
"Reden van aanvraag: "gedagvaard","procedure""
(not a big of deal, but a user is not used to see [])
Kr
W
I am sending a confirmation email with the answers filled in.
Currently it looks like this :
"Reden van aanvraag:["gedagvaard","procedure"]"
Would be nicer if I could do something like
"Reden van aanvraag: "gedagvaard","procedure""
(not a big of deal, but a user is not used to see [])
Kr
W
Awaiting for a nice Editor in the (o.a.) Email template...
Hopefully in the next update..
Hopefully in the next update..
Hi W,
The checkbox group returns an array of values and the CFv6 code seems to convert that into the string you see. There is no Handle Arrays action that I can see but you can do it with a Custom Code action using code like this
Bob
The checkbox group returns an array of values and the CFv6 code seems to convert that into the string you see. There is no Handle Arrays action that I can see but you can do it with a Custom Code action using code like this
<?php
if ( $this->data['checkboxes1'] && is_array($this->data['checkboxes1']) ) {
$this->data['checkboxes1'] = implode(', ', $this->data['checkboxes1'] );
}
?>
Bob
Hi,
The current format is the format preferred when saving the data into database, and its human readable, but I will try to have a better solution for emails in the next update.
Best regards,
Max
The current format is the format preferred when saving the data into database, and its human readable, but I will try to have a better solution for emails in the next update.
Best regards,
Max
This topic is locked and no more replies can be posted.