I´have a checkbox group. Every checkbox have the same name for the validator check that there is checked one at least. The problem is in the mail template, that {services} only show the last checkbox value that is checked and no the Previous checkbox that are cheked.
I don´t know the solution for this, anybody know like do it?
Thank you very much
I don´t know the solution for this, anybody know like do it?
Thank you very much
Hi, get the chronocontact.php file from this latest SVN and overwrite yours, let me know if it fixes it :
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=10723&p=13202&hilit=beta+2.1#p13202
regards
Max
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=10723&p=13202&hilit=beta+2.1#p13202
regards
Max
With chronocontact.php of the last version and the mail have the same error. The mail only shows one of checkbox group that are checked (the last checked check box of the group). The file chronocontact.php of the last version don´t solved the problem.
The code of check box group is the next:
and the code of the template is:
I don´t know the solution for this, anybody know like do it?
Thank you very much
The code of check box group is the next:
......
<span class="label_form">Marca el/los servicio/s que necesitas:</span><br/>
<div align="left">
<input type="checkbox" name="servicios" id="Agua" value="Agua"><span class="value_form">Agua</span><br/>
<input type="checkbox" name="servicios" id="Cafes" value="Cafes"><span class="value_form">Cafes</span><br/>
<input type="checkbox" name="servicios" id="Pastas" value="Pastas"><span class="value_form">Pastas</span><br/>
<input type="checkbox" name="servicios" id="Zumos" value="Zumos"><span class="value_form">Zumos</span><br/>
<input type="checkbox" name="servicios" id="Infusiones" value="Infusiones"><span class="value_form">Infusiones</span><br/>
</div>
.......
and the code of the template is:
<html>
<head></head>
<body>
<b>Nombre:</b> {nombre}<br/>
<b>Sala:</b> {sala}<br/>
<b>Correo Electronico:</b> {E_mail}<br/>
<b>Asunto de Reunion:</b> {evento}<br/>
<b>Servicio que Necesito:</b><br/>
{servicios} <br/><br/>
</body>
</html>
I don´t know the solution for this, anybody know like do it?
Thank you very much
Hi vjmazcu ,
Make the checkbox field name an array name="servicios[]" then it will return all the checked values.
If you have several fields with the same name and it is not an array then each one overwrites the previous result.
Bob
Make the checkbox field name an array name="servicios[]" then it will return all the checked values.
If you have several fields with the same name and it is not an array then each one overwrites the previous result.
Bob
Thanks Bob.
Can you put an example?
And the name that I should use in mail Template? And What name I use in field validation?
I want use the validation data that the component offers, and i have done a e-mail template, and I'd like use it.
Thank you, very much
Can you put an example?
And the name that I should use in mail Template? And What name I use in field validation?
I want use the validation data that the component offers, and i have done a e-mail template, and I'd like use it.
Thank you, very much
Hi,
add [] in the form code itself, in the template or the validation just use teh field name without []
Max
add [] in the form code itself, in the template or the validation just use teh field name without []
Max
Thanks Max, but your solution don`t validate that one check box checked at least, and the mail template show "{servicios}" and no his value for wich field of array.
I think that unique solution is validate with javascript. If you know other possibility?
Thanks you very much
I think that unique solution is validate with javascript. If you know other possibility?
Thanks you very much
please tell me which Chronoforms version do you have
Regards
Max
Regards
Max
ok, lets try this with V3.0 stable, will be ready in a few hours.
Regards
Max
Regards
Max
Thanks Max, with the new version, using servicios[1], servicios[2], ....., servicios[n], the mail template show the results very good, but what I should put in the field " validate-one-required" in validation.
I have tried with "servicios" and "servicios[]", but don`t validate one check box checked at leaast.
I`m sorry. I'm doing many questions.
Thank you verty much.
I have tried with "servicios" and "servicios[]", but don`t validate one check box checked at leaast.
I`m sorry. I'm doing many questions.
Thank you verty much.
Hi, in the new version, V3.0 stable, you can add {servicios} in the email template and it will work, assuming your field name has []
let me know about this.
regarding the at least one required, it may not work with fields which have multiple values, its for "one only" checkboxes or radios.
Regards
Max
let me know about this.
regarding the at least one required, it may not work with fields which have multiple values, its for "one only" checkboxes or radios.
Regards
Max
No problems, at the next release I will add a normal js alert boxes validation.
Max
Max
This topic is locked and no more replies can be posted.