Forums

very simple template

guilomefr 11 May, 2011
Hi
I just want to create a template how allowed the e-mail recipient to see what are the data completed in the form.
For example: a table with two column, one with the submitted value and a second with the submitted value.
I've just two kind of element text label and checkboxes group.
can you help me, I tried many times but my knowledge in html is low😢
regards
GreyHead 11 May, 2011
Hi guilomefr,

Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.

Bob
guilomefr 11 May, 2011
Thanks very much for your help.
Here is the form.
Regards
GreyHead 12 May, 2011
Hi guilomefr,

There is no 'automatic' template in ChronoForms v4

The simplest way to create a template is to copy the page source from the form page. Here's a snippet from your form - I've just reformatted the layout in Dreamweaver to make it more legible
<div class="ccms_form_element cfdiv_text" id="temps_de_d_chargement_container_div">
    <label>Temps de déchargement</label>
    <input maxlength="150" size="30" class="" title="" type="text" value="" name="input_text_13" />
    <div class="clear"></div>
    <div id="error-message-input_text_13"></div>
</div>
<div class="ccms_form_element cfdiv_textarea" id="description_des_colis_container_div">
    <label>Description des colis</label>
    <textarea cols="45" rows="12" class="" title="" type="textarea" name="input_textarea_5"></textarea>
    <div class="clear"></div>
    <div id="error-message-input_textarea_5"></div>
</div>
<div class="ccms_form_element cfdiv_checkboxgroup" id="mode_de_d_chargement_container_div">
    <label>Mode de déchargement</label>
    <input type="checkbox" name="input_checkbox_group_6[]" id="input_checkbox_group_6_choice_1" title="" value="choice 1" class="">
    <label for="input_checkbox_group_6_choice_1">Grue</label>
    <input type="checkbox" name="input_checkbox_group_6[]" id="input_checkbox_group_6_choice_2" title="" value="choice 2" class="">
    <label for="input_checkbox_group_6_choice_2">Camion bras</label>
    <input type="checkbox" name="input_checkbox_group_6[]" id="input_checkbox_group_6_choice_3" title="" value="choice 3" class="">
    <label for="input_checkbox_group_6_choice_3">chariot élévateur</label>
    <div class="clear"></div>
    <div id="error-message-input_checkbox_group_6"></div>
</div>
Then replace the inptu tags like this
<input maxlength="150" size="30" class="" title="" type="text" value="" name="input_text_13" />
with the input name in curly brackets.
{input_text_13}
For the checkbox groups replace the whole group with a single entry so the group here becomes {input_checkbox_group_6} without the []. You also need to add a Handle Array action to the OnSubmit event to convert the checkbox array to a string.

The result for this snippet is this
<div class="ccms_form_element cfdiv_text" id="temps_de_d_chargement_container_div">
    <label>Temps de déchargement</label>
    {input_text_13}
    <div class="clear"></div>
    <div id="error-message-input_text_13"></div>
</div>
<div class="ccms_form_element cfdiv_textarea" id="description_des_colis_container_div">
    <label>Description des colis</label>
    {input_textarea_5}
    <div class="clear"></div>
    <div id="error-message-input_textarea_5"></div>
</div>
<div class="ccms_form_element cfdiv_checkboxgroup" id="mode_de_d_chargement_container_div">
    <label>Mode de déchargement</label>
    {input_checkbox_group_6}
    <div class="clear"></div>
    <div id="error-message-input_checkbox_group_6"></div>
</div>

Repeat for the other entries then copy and paste the result into the Email Templae box and save.

The resulting email look like this:

Entreprise input_text_0
Nom et Prénom input_text_2
Numéro de téléphone input_text_12
Date du déchargement input_text_3
Heure du déchargement input_text_4
Temps de déchargement input_text_13
Description des colis input_textarea_5
Mode de déchargement choice 1,choice 2,choice 3
Destination des colis choice 1,choice 2,choice 3


Clearly you can add other styling or HTML to get the result that you want.

Bob
This topic is locked and no more replies can be posted.