So I need a hidden field for the db, but not for the email sent. Since there are so many forms in one form I only want the populated fields but since that field is always populated it always shows even though there's no other data in that particular form (within the forms form) :). Here's what the email looks like:
QUOTE REQUEST FORM
Form Submitted 4-23-2019 | 7:04 PM UTC
Applicationcs:
csFormName: Core Support Form Specs
linebreakx:
dropdownws: on
wsFormName: Anti-Wrinkle Form Specs
abrFormName: Adjustable bowed roller Form Specs
fbrFormName: Fixed Bowed Roller Form Specs
AntiWrinkleGroup 3: Scroll Roll
Machinesr: 1
Materialsr: 1
Materialthicknessminsr: 1
Materialthicknessmaxsr: 1
Widthminsr: 1
Widthmaxsr: 1
Webtensionminsr: 1
Webtensionmaxsr: 1
Machinespeedsr: 1
Webwrapanglesr: 1
Webwandersr: 1
Notessr: 1
srFormName: 'Scroll roll form Specs
apFormName: Adjusta-Pull Form Specs
stFormName: Standard Trim Removal Form Specs
smFormName: Standard Matrix Removal Form Specs
frtrimFormName: Fox TrimAway Form Specs
fmrFormName: FOX Matrix Form Specs
tcFormName: Trim Chopper Form Specs
sscFormName: Safety Chuck Form Specs
sshFormName: Shaft Holders Form Specs
rmbFormName: Mounting Block Form Specs
irFormName: Idler roller Form Specs
brFormName: Brake Form Specs
ehrFormName: Heated Roller Form Specs
nraFormName: Nip Roller Assembly Form Specs
draFormName: Dancer Roller Assembly Form Specs
isaFormName: Inline Slitting Assembly Form Specs
sctFormName: Shear Cut Edge Trim Assembly Form Specs
usFormName: Unwind Stand Assembly Form Specs
rsFormName: Rewind Stand Assembly Form Specs
cmaFormName: Web Accumulator Form Specs
I don't want all these fields to show up, like rsFormName, ehrFormName, irFormName etc. I only want them to show up if a checkbox (the checkbox that expands the form) is checked. I guess the problem is not the Email Sent code but in the forms If, Then statement. I got my logic wrong I guess: In the hidden fields value, I write:
<?php echo((isset($_POST["dropdownws"])?("Anti-Wrinkle Form Specs"):"")); ?>
It doesn't see if the dropdownws is set. So, it sends no info. I don't know how to write it without expressly putting it in value="Anti-Wrinkle Form Specs" and having it (and all) show up on the email.
I also had tried : (this is the whole input field)
<input type="hidden" id="csFormName" name="csFormName" value="<?php if(isset($_POST["dropdowncs"])) { echo "Core Support Form Specs"; } ?>"
Sorry if I'm confusing you.
Thanks much.