Page 1 of 1
Form Question - Built-In PHP Processor
Posted: Tue Mar 18, 2025 10:48 pm
by bjlolmaugh
I have a question in regards to the resulting email from the Built-In PHP Processor.
The email coming back to me has many of the field in 1 continual line (see Example 1) instead of 1 line per each response (as in Example 2).
How can I get the email results to show as Example 2?

Re: Form Question - Built-In PHP Processor
Posted: Tue Mar 18, 2025 11:23 pm
by BaconFries
Re: Form Question - Built-In PHP Processor
Posted: Wed Mar 19, 2025 6:56 am
by Pablo
Also, note that in the Advanced Form properties there is an option to set the end of line character for messages. The recommended value is 'CRLF'.
Re: Form Question - Built-In PHP Processor
Posted: Wed Mar 19, 2025 2:54 pm
by bjlolmaugh
And you all think this is a better solution than my old ways of importing 3rd party generated HTML for my forms and using the DBTS processor?
The solution suggested here is way too much to do.
Re: Form Question - Built-In PHP Processor
Posted: Wed Mar 19, 2025 3:12 pm
by BaconFries
Simple answer yes. Due to what you currently use "FrontPage" (I believe) which was discontinued way back at the end of 2006 and no longer supported. And as you have wrote recently you just updated from Windows 7 to Windows 11 why do this and not stick with a unsupported operating system if it worked. Also note even now you have updated to WWB20 and you still wish to use your 3rd party html with the DBTS processor it wont be supported if it breaks any code generated with WWB20.
Re: Form Question - Built-In PHP Processor
Posted: Wed Mar 19, 2025 3:15 pm
by bjlolmaugh
BaconFries wrote: Wed Mar 19, 2025 3:12 pm
Simple answer yes. Due to what you currently use "FrontPage" (I believe) which was discontinued way back at the end of 2006 and no longer supported. And as you have wrote recently you just updated from Windows 7 to Windows 11 why do this and not stick with a unsupported operating system if it worked.
Because my browser couldn't be updated any longer and I was having difficulty accessing some websites. Honestly, that is the only reason why.
Re: Form Question - Built-In PHP Processor
Posted: Wed Mar 19, 2025 3:24 pm
by BaconFries
Understood and I appreciate that using WWB20 and how you design and layout for your forms etc is the best way forward. You may also get penalised by Google in the future if your site and others you have build aren't RWD compliant so this is another reason to use the likes of Layout Grids in the future. But only you can decide this.
Re: Form Question - Built-In PHP Processor
Posted: Wed Mar 19, 2025 11:23 pm
by alan_sh
Barbara,
If you want to use third party forms, can I recommend Cognitoforms? I use it all the time in my WWB web sites (here's an example) and it's fully RWD compliant.
Cheers
Alan
Re: Form Question - Built-In PHP Processor
Posted: Wed Apr 02, 2025 8:11 pm
by bjlolmaugh
Question for you on this.
I am in the process of building a form and I have a section with Check Boxes where the user can check more than one.
How do I set that up in the message formatting so it will display all checked boxes for the same question?
Checkbox #1 has a name of HOUSEHOLD, with a value of BUSY
Checkbox #2 has a name of HOUSEHOLD, with a value of NOISY
Checkbox #3 has a name of HOUSEHOLD, with a value of MODERATE
Re: Form Question - Built-In PHP Processor
Posted: Thu Apr 03, 2025 1:16 am
by BaconFries
You can apply the use of square brackets [ ] to the name this will then group them together on select by the user.
Code: Select all
<input type="checkbox" name="household[]" value="busy">
<input type="checkbox" name="household[]" value="noisy">
<input type="checkbox" name="household[]" value="moderate">
Re: Form Question - Built-In PHP Processor
Posted: Thu Apr 03, 2025 3:45 am
by bjlolmaugh
BaconFries wrote: Thu Apr 03, 2025 1:16 am
You can apply the use of square brackets [ ] to the name this will then group them together on select by the user.
Code: Select all
<input type="checkbox" name="household[]" value="busy">
<input type="checkbox" name="household[]" value="noisy">
<input type="checkbox" name="household[]" value="moderate">
Would you mind showing me how to use the brackets in this code formatting?
Name: $name
Email: $email
Website: $website
Re: Form Question - Built-In PHP Processor
Posted: Thu Apr 03, 2025 5:44 am
by Pablo
I think you will need to give each checkbox a unique name.
Code: Select all
<input type="checkbox" name="check_busy" value="busy">
<input type="checkbox" name="check_noisy" value="noisy">
<input type="checkbox" name="check_moderate" value="moderate">
And then format them like this (for example)
Household: busy=$check_busy, noisy=$check_noisy, moderate=$check_moderate,
Re: Form Question - Built-In PHP Processor
Posted: Thu Apr 03, 2025 2:00 pm
by bjlolmaugh
Pablo wrote: Thu Apr 03, 2025 5:44 am
And then format them like this (for example)
Household: busy=$check_busy, noisy=$check_noisy, moderate=$check_moderate,
Hi Pablo,
I set up each checkbox with a unique name, then followed your example in the mail formatting ... unfortunately it didn't work.
This was the ending results: Household Defined: busy=busy, noisy=$check_noisy, moderate=$check_moderate, quiet=quiet, neighborhoodchildren=$check_neighborhoodchildren, busystreet=busystreet
What else can I try?
Re: Form Question - Built-In PHP Processor
Posted: Thu Apr 03, 2025 5:03 pm
by Pablo
It looks like there is an issue with naming.
Make sure the names match exactly
Re: Form Question - Built-In PHP Processor
Posted: Thu Apr 03, 2025 5:06 pm
by bjlolmaugh
Pablo wrote: Thu Apr 03, 2025 5:03 pm
It looks like there is an issue with naming.
Make sure the names match exactly
Yep, I went through and checked all of that,
The next attempt was adding these fields to the mail forwarding:
Household Defined1: $yes_busy
Household Defined2: $yes_noisy
Household Defined3: $yes_moderate
Household Defined4: $yes_quiet
Household Defined5: $yes_neighborhood_children
Household Defined6: $yes_busystreet
The resulting email was in reverse. The boxes I checked did not reflect an answer, and the boxes I did not check reflected the $field.
I checked off #1 and #4 and those 2 fields are blank.
Household Defined1:
Household Defined2: $yes_noisy
Household Defined3: $yes_moderate
Household Defined4:
Household Defined5: $yes_neighborhood_children
Household Defined6: street
Re: Form Question - Built-In PHP Processor
Posted: Thu Apr 03, 2025 5:12 pm
by Pablo
If you need my help then share a DEMO project.
Please remove everything from the project and page that is not relevant to your question otherwise it will take me a lot of extra to figure out what is wrong.

Re: Form Question - Built-In PHP Processor
Posted: Thu Apr 03, 2025 5:30 pm
by bjlolmaugh
Re: Form Question - Built-In PHP Processor
Posted: Thu Apr 03, 2025 7:55 pm
by Pablo
I think the problem is that the checkboxes do not have a 'no' value.
This information is from the help: (F1)
Normally, if a checkbox is unchecked then the browser will not send the value to the server.
In WWB, you can also set a value for the ‘OFF’ state. You can set the OFF value, by using two values separated by a pipe-symbol.
For example: ON | OFF.
Re: Form Question - Built-In PHP Processor
Posted: Thu Apr 03, 2025 8:34 pm
by bjlolmaugh
Pablo wrote: Thu Apr 03, 2025 7:55 pm
I think the problem is that the checkboxes do not have a 'no' value.
This information is from the help: (F1)
Normally, if a checkbox is unchecked then the browser will not send the value to the server.
In WWB, you can also set a value for the ‘OFF’ state. You can set the OFF value, by using two values separated by a pipe-symbol.
For example: ON | OFF.
Were you sucessful in testing it?
Does the value have to be the same for all 6 boxes or different?
I just set it up with different values, HOUSEHOLD1, HOUSEHOLD2, etc. and this is the results I got (I checked off Box 1 & Box 5)
Household Defined1: HOUSEHOLD1
Household Defined2: $yes_noisy
Household Defined3: $yes_moderate
Household Defined4: $yes_quiet
Household Defined5: HOUSEHOLD5
Household Defined6: $yes_buzystreet
Re: Form Question - Built-In PHP Processor
Posted: Thu Apr 03, 2025 8:53 pm
by bjlolmaugh
I almost have it.
I reversed the value/name.
Checkbox 1 now has a name household1, and a value YES-BUSY HOUSEHOLD.
Changed the other 5 the same way.
Then in the email formatting script:
Household Defined1: $household1
Household Defined2: $household2
Household Defined3: $household3
Household Defined4: $household4
Household Defined5: $household5
Household Defined6: $household6
Now when I get the email it displays this way (I checked off Box 1 & 6):
Household Defined1: YES-BUSY HOUSEHOLD
Household Defined2: $household2
Household Defined3: $household3
Household Defined4: $household4
Household Defined5: $household5
Household Defined6: YES-BUSY STREET
It is giving me the value I am looking for, however, it's still showing a response in the boxes I did not check off.
If there is a way to have no response come through on the unchecked boxes, that would be great. If not, I can live with these results.
Re: Form Question - Built-In PHP Processor
Posted: Fri Apr 04, 2025 5:55 am
by Pablo
If there is a way to have no response come through on the unchecked boxes, that would be great.
No, there is no option for that. This will a require custom script.
Re: Form Question - Built-In PHP Processor
Posted: Fri Apr 04, 2025 9:21 am
by BaconFries
As Pablos reply this would require a custom solution. You can try the following (untested) by inserting Between the <head></head> tags* in Page HTML. Note you are required to change
myForm to the name of your form example
Form1
Code: Select all
<script>
document.getElementById('myForm').addEventListener('submit', function(event) {
const checkboxes = document.querySelectorAll('input[type="checkbox"]');
checkboxes.forEach(checkbox => {
if (!checkbox.checked) {
checkbox.name = ''; // Remove the name, effectively excluding it from the submission.
}
});
// The form will now submit, and unchecked checkboxes will not be included.
});
</script>
What this does in theory is to check or add a listener so if any of the checkboxes are checked or not and onsubmit only sends the those that are will be received
As mentioned it is untested.
Re: Form Question - Built-In PHP Processor
Posted: Fri Apr 04, 2025 1:58 pm
by bjlolmaugh
BaconFries wrote: Fri Apr 04, 2025 9:21 am
As Pablos reply this would require a custom solution. You can try the following (untested) by inserting Between the <head></head> tags* in Page HTML. Note you are required to change
myForm to the name of your form example
Form1
Code: Select all
<script>
document.getElementById('myForm').addEventListener('submit', function(event) {
const checkboxes = document.querySelectorAll('input[type="checkbox"]');
checkboxes.forEach(checkbox => {
if (!checkbox.checked) {
checkbox.name = ''; // Remove the name, effectively excluding it from the submission.
}
});
// The form will now submit, and unchecked checkboxes will not be included.
});
</script>
What this does in theory is to check or add a listener so if any of the checkboxes are checked or not and onsubmit only sends the those that are will be received
As mentioned it is untested.
Thank you, however, upon testing it did not make any difference.
Re: Form Question - Built-In PHP Processor
Posted: Fri Apr 04, 2025 9:42 pm
by bjlolmaugh
THANK YOU GUYS FOR ALL YOUR HELP.
I was able to get the form completed and I am very satisfied with the end results.
Sorry to be such a pain, but I truly appreciate your assistance.
Re: Form Question - Built-In PHP Processor
Posted: Sun Apr 06, 2025 9:29 am
by BaconFries
Sorry to be such a pain, but I truly appreciate your assistance.
No need to be sorry thats the purpose of the forum to try and provide help when needed.