Send form Data in email

ponyack 13 May, 2013
Hi,

I have a simple form with 5 data sets, so is there a way to just send this data in an email to the person who is administering the website? Currently we login to view the file and download a CSV.

Thanks,

John
GreyHead 14 May, 2013
Hi John,

You can send them an email each time someone registers, that's the most common method. You can also build a form in the front-end to download a CSV file so they don't have to log in. Or you could set up a form triggered by a cron job on the server that would send them a CSV file say once a week.

It all depends . . .

Bob
ponyack 08 Jan, 2014
Hi,

How would one go about setting up the form in the front-end to download a CSV file so they don't have to log in.

I am not a server guy so the cron job is well out of my element

John
GreyHead 09 Jan, 2014
Hi John,

A cron job is usually a simple set up from your site's CPanel. You just set the time/frequency and add a URL. In this case the URL would be to a form event that creates and emails the CSV file.

To do it with a form I usually create a form with just a submit button and, if necessary, the Authenticator action to limit access. In the On Submit event use a tone of the CSV Export actions to create the file. I'd suggest that for CFv4 you use my CSV Export [GH] v2 as it has a few more settings than the default version.

Bob
ponyack 17 Jan, 2014
Thanks for the input.

If i install the new version will it overwrite my current forms?

Also, I will give these options a try and see if I can get them to work

John
GreyHead 17 Jan, 2014
Hi John,

Upgrading to a newer release of the same version of ChronoForms shouldn't do anything to your forms . . . but better take a backup just in case.

Bob
ponyack 23 Jan, 2014
[attachment=0]actions.JPG[/attachment]I tried the method found here http://greyhead.net/how-to-docs/cfv4-csv-export-gh-action

And I ran into issues,

One, it duplicated my form. Two, after submission the message it showed this message

You may download your file from here .

{csv_count} records were exported.
The file size is {csv_size} kb.

Now sure what I am doing wrong - a screen shot of my actions page is attached
GreyHead 24 Jan, 2014
Hi John,

The obvious problem is that you don't have a CSV Export action in your form On Submit event. What are you trying to do now?

Bob
ponyack 24 Jan, 2014
Hi Bob,

Sorry about that, I added the wrong screen capture.

So I have added the CSV export.

How can I get the this info into the the email that is being sent to the admin of the website

Select all
You may download your file from here .

{csv_count} records were exported.
The file size is {csv_size} kb.

Additionally, I am trying to keep the user thank-you message.

John







[attachment=0]forms.JPG[/attachment]
ponyack 24 Jan, 2014
Bob,

I got it to work.

It sends an email with he information.

Now i just need to clean up the email data.

Any suggestions for getting the information better organized?

Thanks,

John
GreyHead 24 Jan, 2014
Hi John,

Any suggestions for getting the information better organized?

How specifically?

Bob
ponyack 24 Jan, 2014
Hi Bob,

As you can see in the screen capture the email could use some formatting.

John

[attachment=0]email.JPG[/attachment]
GreyHead 24 Jan, 2014
Hi John,

The Email template is just HTML you can edit it to do whatever you need.

Bob
ponyack 24 Jan, 2014
Hi Bob,

This is the template in the Email Action?

John
GreyHead 24 Jan, 2014
Hi John,

Yes, exactly. If it is set to use the Rich Text Editor you can turn that off and use plain HTML.

Bob
ponyack 27 Jan, 2014
Hi Bob,

I am very close to having the email fished. I edited the auto generated table to get the look I wanted but I think I am missing some code.

Here is the form page http://hilkerscleaners.com/index.php/pickup-delivery

At the bottom of the form the user will check off the "Preferences" for their clothing.

But when the email arrives all preferences are showing - this should only show the "checked" preferences.

Thanks,

John

Here is the Auto Generated Table that I am working with.

<table cellpadding="5" cellspacing="5" border="0">
	<tr>
		<td colspan='2'>
			<table width="100%" border="0" cellpadding="1">
  <tr>
  <table width="100%" border="0" cellpadding="1">
  <tr>
    <td><div class="ccms_form_element cfdiv_text" id="autoID-3680417c36a52a2c2531b3eb2b0eda68_container_div"><label>First Name</label>{firstName}
<div class="clear"></div><div id="error-message-firstName"></div></div></td>
    <td><div class="ccms_form_element cfdiv_text" id="autoID-bfb9e9fdf18f3f2457e842aa55b470ca_container_div"><label>Last Name</label>{lastName}
<div class="clear"></div><div id="error-message-lastName"></div></div></td>
    <td><div class="ccms_form_element cfdiv_text" id="autoID-473e6faae14e49c5820f97f616635b1c_container_div"><label>Telephone Number</label>{phone}
<div class="clear"></div><div id="error-message-phone"></div></div></td>
  </tr>
</table>
		</td>
	</tr>
	<tr>
		<td>
			<strong>Street Address</strong>
		</td>
		<td>
			{address}
		</td>
	</tr>
	<tr>
		<td>
			<strong>Address Line 2</strong>
		</td>
		<td>
			{address2}
		</td>
	</tr>
	<tr>
		<td colspan='2'>
			<table width="100%" border="0" cellpadding="1">
  <tr>
    <td><div class="ccms_form_element cfdiv_text" id="autoID-faac9b3de7a5ff2488d27536c5323963_container_div">{city}<label>City</label>
<div class="clear"></div><div id="error-message-city"></div></div></td>
    <td><div class="ccms_form_element cfdiv_text" id="autoID-00840003bbb7bd134c801716bbbe7d95_container_div">{state}<label>State</label>
<div class="clear"></div><div id="error-message-state"></div></div></td>
    <td><div class="ccms_form_element cfdiv_text" id="autoID-c1e4d727e85038b9d6ea950907767338_container_div">{zip}<label>Zip Code</label>
<div class="clear"></div><div id="error-message-zip"></div></div></td>
  </tr>
</table>
		</td>
	</tr>
	<tr>
		<td colspan='2'>
			<table width="100%" border="0" cellpadding="1">
  <tr>
    <td><div class="clear"></div><div id="error-message-city"></div></div><div class="ccms_form_element cfdiv_text" id="autoID-910d9fb70203b8b9d7cb1b9983574e57_container_div"><label>Email</label>{email}
<div class="clear"></div><div id="error-message-email"></div></div></td>


    <td>
<div class="ccms_form_element cfdiv_radio" id="autoID-bf678dc5a8c8043c48a9093efdc4596d_container_div"><label>Pick Up / Delivery</label>{pickup_delivery}
<div style="float:left; clear:none;">



</div><div class="clear"></div><div id="error-message-pickup_delivery"></div></div></td>
  </tr>
</table>
		</td>
	</tr>
	<tr>
		<td>
			<strong>Choose A Store Location</strong>
		</td>
		<td>
			{location}
		</td>
	</tr>
	<tr>
		<td colspan='2'>
			<div class="clear"></div>
<div id="error-message-input_custom_9"></div>
<div class="ccms_form_element cfdiv_checkboxgroup radios_over multiline_add" id="autoID-f8c971ad1c1abb5800e696e33da6e97d_container_div">
<table width="100%" border="0" cellpadding="1">
<tr>

<td valign="top">
<label>Shirts</label>{shirts}
<div style="float:left; clear:none;">


<label for="input_checkbox_group_10_0">No Starch</label>


<label for="input_checkbox_group_10_1">Light Starch</label>


<label for="input_checkbox_group_10_2">Medium Starch</label>


<label for="input_checkbox_group_10_0">Heavy Starch</label>


<label for="input_checkbox_group_10_1">On Hanger</label>


<label for="input_checkbox_group_10_2">Folded in box</label>
</td>
   
   
   
<td valign="top">
<label>Sweaters</label>{sweaters}
<div style="float:left; clear:none;">


<label for="input_checkbox_group_11_0">Folded Over Hanger</label>


<label for="input_checkbox_group_11_1">On Hanger</label>


<label for="input_checkbox_group_11_2">Folded in Sweater Bag</label>
</td>



<td valign="top">
<label>Neck Tie/Scarves</label>{necktie_scarf}
<div style="float:left; clear:none;">


<label for="input_checkbox_group_12_0">Folded and boxed</label>


<label for="input_checkbox_group_12_1">On hanger</label>
</td>

  
<td valign="top">
<label>Comforters/Bedding</label>{comforters_bedding}
<div style="float:left; clear:none;">


<label for="input_checkbox_group_13_0">Folded Over Hanger</label>


<label for="input_checkbox_group_13_1">Folded in a Linen Bag</label>
</td>
 
</tr>
</table>

</div>
<div class="clear"></div>
<div id="error-message-input_checkbox_group_10"></div>
		</td>
	</tr>
</table>
ponyack 27 Jan, 2014
Hi Bob,

I thought I posted a reply to this but it looks like it did not show up.

I am very close to getting the email done.

Here is form: http://hilkerscleaners.com/index.php/pickup-delivery

In the Preference section the user can choose different ways to have their clothing delivered. But in the email all the preferences are sent.

I used the auto-generated email template - I think its missing some code.

Thanks,

John

Here is the HTML

<table cellpadding="5" cellspacing="5" border="0">
	<tr>
		<td colspan='2'>
			<table width="100%" border="0" cellpadding="1">
  <tr>
  <table width="100%" border="0" cellpadding="1">
  <tr>
    <td><div class="ccms_form_element cfdiv_text" id="autoID-3680417c36a52a2c2531b3eb2b0eda68_container_div"><label>First Name</label>{firstName}
<div class="clear"></div><div id="error-message-firstName"></div></div></td>
    <td><div class="ccms_form_element cfdiv_text" id="autoID-bfb9e9fdf18f3f2457e842aa55b470ca_container_div"><label>Last Name</label>{lastName}
<div class="clear"></div><div id="error-message-lastName"></div></div></td>
    <td><div class="ccms_form_element cfdiv_text" id="autoID-473e6faae14e49c5820f97f616635b1c_container_div"><label>Telephone Number</label>{phone}
<div class="clear"></div><div id="error-message-phone"></div></div></td>
  </tr>
</table>
		</td>
	</tr>
	<tr>
		<td>
			<strong>Street Address</strong>
		</td>
		<td>
			{address}
		</td>
	</tr>
	<tr>
		<td>
			<strong>Address Line 2</strong>
		</td>
		<td>
			{address2}
		</td>
	</tr>
	<tr>
		<td colspan='2'>
			<table width="100%" border="0" cellpadding="1">
  <tr>
    <td><div class="ccms_form_element cfdiv_text" id="autoID-faac9b3de7a5ff2488d27536c5323963_container_div">{city}<label>City</label>
<div class="clear"></div><div id="error-message-city"></div></div></td>
    <td><div class="ccms_form_element cfdiv_text" id="autoID-00840003bbb7bd134c801716bbbe7d95_container_div">{state}<label>State</label>
<div class="clear"></div><div id="error-message-state"></div></div></td>
    <td><div class="ccms_form_element cfdiv_text" id="autoID-c1e4d727e85038b9d6ea950907767338_container_div">{zip}<label>Zip Code</label>
<div class="clear"></div><div id="error-message-zip"></div></div></td>
  </tr>
</table>
		</td>
	</tr>
	<tr>
		<td colspan='2'>
			<table width="100%" border="0" cellpadding="1">
  <tr>
    <td><div class="clear"></div><div id="error-message-city"></div></div><div class="ccms_form_element cfdiv_text" id="autoID-910d9fb70203b8b9d7cb1b9983574e57_container_div"><label>Email</label>{email}
<div class="clear"></div><div id="error-message-email"></div></div></td>


    <td>
<div class="ccms_form_element cfdiv_radio" id="autoID-bf678dc5a8c8043c48a9093efdc4596d_container_div"><label>Pick Up / Delivery</label>{pickup_delivery}
<div style="float:left; clear:none;">



</div><div class="clear"></div><div id="error-message-pickup_delivery"></div></div></td>
  </tr>
</table>
		</td>
	</tr>
	<tr>
		<td>
			<strong>Choose A Store Location</strong>
		</td>
		<td>
			{location}
		</td>
	</tr>
	<tr>
		<td colspan='2'>
			<div class="clear"></div>
<div id="error-message-input_custom_9"></div>
<div class="ccms_form_element cfdiv_checkboxgroup radios_over multiline_add" id="autoID-f8c971ad1c1abb5800e696e33da6e97d_container_div">
<table width="100%" border="0" cellpadding="1">
<tr>

<td valign="top">
<label>Shirts</label>{shirts}
<div style="float:left; clear:none;">


<label for="input_checkbox_group_10_0">No Starch</label>


<label for="input_checkbox_group_10_1">Light Starch</label>


<label for="input_checkbox_group_10_2">Medium Starch</label>


<label for="input_checkbox_group_10_0">Heavy Starch</label>


<label for="input_checkbox_group_10_1">On Hanger</label>


<label for="input_checkbox_group_10_2">Folded in box</label>
</td>
   
   
   
<td valign="top">
<label>Sweaters</label>{sweaters}
<div style="float:left; clear:none;">


<label for="input_checkbox_group_11_0">Folded Over Hanger</label>


<label for="input_checkbox_group_11_1">On Hanger</label>


<label for="input_checkbox_group_11_2">Folded in Sweater Bag</label>
</td>



<td valign="top">
<label>Neck Tie/Scarves</label>{necktie_scarf}
<div style="float:left; clear:none;">


<label for="input_checkbox_group_12_0">Folded and boxed</label>


<label for="input_checkbox_group_12_1">On hanger</label>
</td>

  
<td valign="top">
<label>Comforters/Bedding</label>{comforters_bedding}
<div style="float:left; clear:none;">


<label for="input_checkbox_group_13_0">Folded Over Hanger</label>


<label for="input_checkbox_group_13_1">Folded in a Linen Bag</label>
</td>
 
</tr>
</table>

</div>
<div class="clear"></div>
<div id="error-message-input_checkbox_group_10"></div>
		</td>
	</tr>
</table>
GreyHead 31 Jan, 2014
Hi John,

I think that you have used Checkbox Groups (which allow multiple choice) for the packing options where you needed to use Radio Buttons (which only allow a single choice). It makes no sense to allow multiple choice of the amount of starch to use.

Bob
ponyack 31 Jan, 2014
Hi Bob,

That makes total sense. So much for following the clients orders.

John
ponyack 31 Jan, 2014
Hi Bob,

I am trying to align the radio buttons vertically. When I test the button they are out of align. As ideas on hwo to get them to line up.

Here is the code

<table width="800" border="0" cellspacing="0">
  <tr>
    <td width="200" valign="top">
<div id="error-message-input_checkbox_group_10"></div>

<div id="error-message-input_custom_18"></div>

<div class="ccms_form_element cfdiv_radio" id="input_radio_271_container_div" style=""><label>Shirts</label><input type="hidden" name="input_radio_27" value="" alt="ghost" />
<br /><input type="radio" name="input_radio_27" id="input_radio_27_0" title="" value="No Starch" class="" />
<label for="input_radio_27_0">No Starch</label>
<br />
<input type="radio" name="input_radio_27" id="input_radio_27_1" title="" value="Light Starch" class="" />
<label for="input_radio_27_1">Light Starch</label>
<br />
<input type="radio" name="input_radio_27" id="input_radio_27_2" title="" value="Medium Starch" class="" />
<label for="input_radio_27_2">Medium Starch</label>
<br />
<input type="radio" name="input_radio_27" id="input_radio_27_3" title="" value="Heavy Starch" class="" />
Heavy Starch</label>
</div></td>



    <td width="200" valign="top">
       
    <div id="error-message-input_radio_28"></div>
       
    <div class="ccms_form_element cfdiv_radio" id="input_radio_241_container_div" style="">
    
<label>Sweaters</label><input type="hidden" name="input_radio_24" value="" alt="ghost" />
<br />
<input type="radio" name="input_radio_24" id="input_radio_24_0" title="" value="Folded Over Hanger" class="" />
<label for="input_radio_24_0">Folded Over Hanger</label>
<br />
<input type="radio" name="input_radio_24" id="input_radio_24_1" title="" value="On Hanger" class="" />
<label for="input_radio_24_1">On Hanger</label>
<br />
<input type="radio" name="input_radio_24" id="input_radio_24_2" title="" value="Folded in Sweater Bag" class="" />
<label for="input_radio_24_2">Folded in Sweater Bag</label>
</div></td>


    <td width="200" valign="top">
    
    <div id="error-message-input_radio_24"></div>
    <div class="ccms_form_element cfdiv_radio" id="input_radio_251_container_div" style=""><label> Neck Tie/Scarves</label><input type="hidden" name="input_radio_25" value="" alt="ghost" />
      <br />
      <input type="radio" name="input_radio_25" id="input_radio_25_0" title="" value="Folded and Boxed" class="" />
<label for="input_radio_25_0">Folded and Boxed</label>
<br />
<input type="radio" name="input_radio_25" id="input_radio_25_1" title="" value="On Hanger" class="" />
<label for="input_radio_25_1">On Hanger</label>
</div></td>


    <td width="200" valign="top">
    <div id="error-message-input_radio_25"></div> 
    
    <div class="ccms_form_element cfdiv_radio" id="input_radio_261_container_div" style=""><label>Comforters/Bedding</label><input type="hidden" name="input_radio_26" value="" alt="ghost" />
      <br />
      <input type="radio" name="input_radio_26" id="input_radio_26_0" title="" value="Folded Over Hanger" class="" />
<label for="input_radio_26_0">Folded Over Hanger</label>
<br />
<input type="radio" name="input_radio_26" id="input_radio_26_1" title="" value="Folded in a Linen Bag" class="" />
<label for="input_radio_26_1">Folded in a Linen Bag</label>
</div></td>
  </tr>
</table>
ponyack 31 Jan, 2014
Oh man, I missed the vertical check box in the wizard form.

My radio buttons are now vertical

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