-SOLVED- Donating form doesn't send/execute the data ??

Issues related to forms.
Post Reply
User avatar
Bluesman
 
 
Posts: 1197
Joined: Mon Feb 01, 2016 5:43 pm
Location: Sweden
Contact:

-SOLVED- Donating form doesn't send/execute the data ??

Post by Bluesman »

Hi Pablo and wwb:rs.

It has 2 forms made in Wysiwyg ver 20.1.0 and some PHP donating scripts from PHP Jabbers. All works ok except for the "Donating" form at the right made in WWB. I had setup with reCaptcha ver 3 and SMTP Mailengine from start. but now I have stripped down to basic. But still doesn't work, just get a white blanc page when hitting "Donate". There are no conditions and validations for now.

Grateful if someone can have a look.
:) tnx
Last edited by Bluesman on Sun Apr 06, 2025 3:21 pm, edited 1 time in total.
"Make My Day"

See my Website
pmacdonald
 
 
Posts: 30
Joined: Wed Feb 23, 2022 7:03 pm

Re: Donating form doesn't send/execute the data ??

Post by pmacdonald »

Hi Bluesman,

I notice that in your sample project that the layout grid "givingLayoutGrid3" and "givingLayoutGrid2" both have the Enable Form checkbox activated.

If you turn that off on "givingLayoutGrid3" you will certainly see a different behaviour.
Not sure if that is the real problem however but perhaps worth investigating.

In your real life scenario I suspect you will have a problem with your script because there are 2 hidden fields named "formid" with different values and your php script is checking for these values in order to take specific action.

if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'givinglayoutgrid2')
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'givinglayoutgrid3')

If you submit both these forms when clicking the donate button, only one of these is going to get processed, the last value to be assigned I would think.

Not sure if that helps or not.

Regards,
Parker
User avatar
Bluesman
 
 
Posts: 1197
Joined: Mon Feb 01, 2016 5:43 pm
Location: Sweden
Contact:

Re: Donating form doesn't send/execute the data ??

Post by Bluesman »

Hi pmacdonald. Thanks a lot for pointing me... I will check that immediately. Quite obvious error that I should have noticed myself. Some time you need more open eyes to see :) tnx
"Make My Day"

See my Website
User avatar
Bluesman
 
 
Posts: 1197
Joined: Mon Feb 01, 2016 5:43 pm
Location: Sweden
Contact:

Re: Donating form doesn't send/execute the data ??

Post by Bluesman »

pmacdonald wrote: Sun Apr 06, 2025 2:45 pm Hi Bluesman,

I notice that in your sample project that the layout grid "givingLayoutGrid3" and "givingLayoutGrid2" both have the Enable Form checkbox activated.

If you turn that off on "givingLayoutGrid3" you will certainly see a different behaviour.
Not sure if that is the real problem however but perhaps worth investigating.

In your real life scenario I suspect you will have a problem with your script because there are 2 hidden fields named "formid" with different values and your php script is checking for these values in order to take specific action.

if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'givinglayoutgrid2')
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'givinglayoutgrid3')

If you submit both these forms when clicking the donate button, only one of these is going to get processed, the last value to be assigned I would think.

Not sure if that helps or not.

Regards,
Parker
Yeah... that was it, gracias amigo! :D
"Make My Day"

See my Website
pmacdonald
 
 
Posts: 30
Joined: Wed Feb 23, 2022 7:03 pm

Re: -SOLVED- Donating form doesn't send/execute the data ??

Post by pmacdonald »

Excellent.
Very glad to have been of some help.

Cheers,
Parker
Post Reply