Forums

Submission Data Question

oculusmm 05 Jan, 2011
Hi,

I have a booking form located at the following URL
http://www.inside-and-out.co.uk/special-offers/booking-form-edinburgh

When a user selects a treatment (by selecting a radio button) and sends the form to us what we receive is a copy of the template that has been generated in the email template section of the whole booking form. A short summary below where the {} is this is the the radio button name.

{Detox_Programme} The Detox Programme - 30min £15.00
{Colon_Cleansing} The Colon Cleansing Programme - 30min £15.00
{Liver_Programme} The Liver Programme - 30min £15.00
{Menstrual_Programme} The Menstrual Programme - 30min £15.00
{Kidney_Programme} The Kidney Programme - 30min £15.00

In the email we receive we cannot see which radio button has been selected. Is there a way of only sending the form data that the user has filled in rather than the whole form??

This form has initially been created in Dreamweaver and imported into 3.1 RC5.5

Thanks in advance for any help to identify what i am doing wrong...
GreyHead 06 Jan, 2011
Hi oculusmm,

ChronoForms is not very clever at handling checkboxes - the main problem is that an unchecked checkbox doesn't send anything at all back when the form is submitted so ChronoForms just ignores that code in the template.

The easy fix is to add code like this in the OnSubmit Before Email box (repeated for each checkbox)
<?php
$Detox_Programme = JRequest::getString('Detox_Programme', '', 'post');
JRequest::setVar('Detox_Programme', $Detox_Programme);
?>

The just use {Detox_Programme} in the Email template (without the long label).

Bob

PS If you prefer you can modify this to return Yes/No values
This topic is locked and no more replies can be posted.