PHP Form Email

Issues related to forms.
Post Reply
GPK5050
 
 
Posts: 65
Joined: Thu Apr 26, 2018 4:03 pm

PHP Form Email

Post by GPK5050 » Sat Jun 02, 2018 10:27 pm

Hi...

I have a form that I have been working on for quite a while. There is one issue that is hanging it's completion up. When the completed form sends an email, instead of the email saying it's value of the box, it responds with... "oncalc" instead of 50.

A very nice gentleman, Graham W, has been helping me with the form and he is stuck as well saying...

"I have tried all sorts of things with this and it still wont give the value. Im wondering if it’s a bug because I changed everything to javascript and it still puts the words calc in the filed when emailed instead of the value it sees in it.

I even wrote a javascript to get the field value but still same issue."


I have attached the wbs file for inspection.

Thank you in advance!

Greg

https://www.mediafire.com/file/aetl823g ... tion15.wbs

User avatar
Pablo
 
Posts: 14514
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: PHP Form Email

Post by Pablo » Sun Jun 03, 2018 7:17 am

Can you please be more specific?
Which exact value are you referring to?

Tip: if you run into a problem like this then remove all non-relevant fields from the form and see if it work then. That will make it much easier to figure out what is wrong.

GPK5050
 
 
Posts: 65
Joined: Thu Apr 26, 2018 4:03 pm

Re: PHP Form Email

Post by GPK5050 » Sun Jun 03, 2018 3:12 pm

Hi...

When selecting a Checkbox, a value goes into the corresponding Editbox. When the form is submitted, instead of showing the value of the box, it says "oncalc".

I hope this helps....

Thanks...

Greg

User avatar
Pablo
 
Posts: 14514
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: PHP Form Email

Post by Pablo » Sun Jun 03, 2018 3:19 pm

Is this for all checkboxes?

GPK5050
 
 
Posts: 65
Joined: Thu Apr 26, 2018 4:03 pm

Re: PHP Form Email

Post by GPK5050 » Sun Jun 03, 2018 3:28 pm

Yes...

This is how the form reads:

Registration: $registrationcalc<br>
Thursday: $thursdaycalc<br>
Friday: $fridaycalc<br>
Saturday: $saturdaycalc<br>
Complete Event: $completecalc<br>
Previous Donation: $previousdonation<br>
Grand Total: $grandtotal<br>

This is the response being sent via email:

Registration: oncalc
Thursday: oncalc
Friday: oncalc
Saturday: oncalc
Complete Event: oncalc
Previous Donation: 50
Grand Total: 300

The difference between the boxes that actually have a total in them is, that value is actually submitted by the user (Previous Donation) or calculated by the form (Grand Total). The other five boxes totals come from the Checkbox being checked.

Thanks...

Greg

User avatar
Pablo
 
Posts: 14514
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: PHP Form Email

Post by Pablo » Sun Jun 03, 2018 4:11 pm

I am not sure, but I think this is related to the naming of the input fields.

For example,
thursday and thursdaycalc
where 'thursday' is also part of 'thursdaycalc'

My suggestion is to rename all short name to unique variables.
For example, rename 'thursday' to 'thursdaycheck'
'friday' -> 'fridaycheck'
etc

this makes all field names unique.

GPK5050
 
 
Posts: 65
Joined: Thu Apr 26, 2018 4:03 pm

Re: PHP Form Email

Post by GPK5050 » Sun Jun 03, 2018 4:21 pm

Hi...

I will try that and let you know...

Thanks!

Greg

GPK5050
 
 
Posts: 65
Joined: Thu Apr 26, 2018 4:03 pm

Re: PHP Form Email

Post by GPK5050 » Sun Jun 03, 2018 10:11 pm

Hey...

That seems to have done the trick!

Perfecto!

Thank you!

Greg

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests