I'm looking to find out how to display the checkbox label rather than the value in both BreezingForms > Submit Form > After Submit and in a ContentBuilder View > Content Template.
For example, I have a Radio Button idRadio with the label YES as value 9 and a label NO as a value 3. I want to store the values as numbers but show the values in the mailback script and the view as the words Yes or No.
UPDATE: I've found info from an old post where you helped someone with something similar that works for the ContentBuilder > View > Content Prepare:
if($items["battleflight"]["value"] == '2'){$items["battleflight"]["value"] ='2-Man o\' War';}
So my only remaining issue is how to do the same for my radio button and checkbox in BreezingForms > Submit Form > After Submit:
// defining containers for values
$q6 = '';
// defining value of containers
foreach ($this->maildata as $data)
{
if( $data[_FF_DATA_NAME] == 'idbfq6'){
$q6 = $data[_FF_DATA_VALUE]; //here is where I think I need to tell it if value = 9 then yes, if 3 then no
}
}
// appending to body
//$body .= 'Do you require outdoor seating? ' . $q6 . "\n";
UPDATE: I've figured out the code for the radio boxes in the script for end submit but I am still stuck on the checkbox. Here's the working code for the radio box in case anyone needs it:
if( ff_getSubmit("idbfq2") == "9"){
$q2= 'Yes';
}
if( ff_getSubmit("idbfq2") == "3"){
$q2= 'No';
}
if( $data[_FF_DATA_NAME] == 'idbfq2'){
$q2 = $data[_FF_DATA_VALUE];
}
Here's where I'm at with the checkbox but it's just not changing the number to a word. The only values are 3 or 9 (or null if it were skipped) and it continues to use the 3 or 9 (and as I was pasting the code I found my error - the code below is good now):
if( ff_getSubmit("idbfCheckbox") <> "3"){
$answers = 'Yes';
}
if( ff_getSubmit("idbfCheckbox") == ""){
$answers = 'Incomplete';
}
if( ff_getSubmit("idbfCheckbox") == "3"){
$answers = 'No';
}
if( $data[_FF_DATA_NAME] == 'idbfCheckbox'){
$answers = $data[_FF_DATA_VALUE];
}
UPDATE: All my questions have been figured out - leaving this up for others.