Skip Navigation

[Gelöst] Cred Forms Submit to 404 page – help

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem: When I submit a CRED form I'm redirected to a 404 page. I also see a notices on my CRED form:

Notice: Undefined index: required in /path/to/wp-content/plugins/cred-frontend-editor/application/models/field/generic.php on line 62
Notice: Undefined index: required in /path/to/wp-content/plugins/cred-frontend-editor/application/models/field/generic.php on line 63

Solution: Add the required attribute to all generic fields in this CRED form, and set it to 0 if the field is not required.

[cred_generic_field field='wpcf-company-size' type='select' class='form-control' output='bootstrap' urlparam='']
{
"required":0,
"validate_format":0,
"persist":1,
"default":["1-10"],
"options":[
{"value":"1-10","label":"Employees: 1-10"},
{"value":"11-50","label":"Employees: 11-50"},
{"value":"51-200","label":"Employees: 51-200"},
{"value":"201-500","label":"Employees: 201-500"},
{"value":"501-1000","label":"Employees: 501-1000"},
{"value":"1001-5000","label":"Employees: 1001-5000"},
{"value":"5001-10,000","label":"Employees: 5001-10,000"},
{"value":"10,001+","label":"Employees: 10,001+"}
]
}
[/cred_generic_field]

Relevant Documentation:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_generic_field

This support ticket is created vor 6 Jahren, 9 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Dieses Thema enthält 4 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von stuart vor 6 Jahren, 9 Monaten.

Assistiert von: Christian Cox.

Author
Artikel
#623084

My Cred froms are submitting to 404 page instead of CPT...no idea why.
Just moved to live server and issue arose, amazon s3.

deactivated all plugins apart from cred and trypes.
created a new cpt and tested a new cred form, same deal?

help... can share details with you

#623087
cred fail.jpg

ok had to reset the permalink structure and Im getting further, but on final submit of second stage form im getting a message about and issue attached.

the data is being saved tho?

strange

#623089

the flow - home page, select a category (form part one) - this opens next page, then click on button for modal - enter date for the edit form, then this submits contact details... this is where i get the message.

thanks

#623117

Hi, it looks like error logging is turned up on this environment so that PHP notices are being displayed on the site, which is causing a problem with CRED AJAX submissions. I added required:0 to this generic field so that it would stop complaining:

[cred_generic_field field='wpcf-company-size' type='select' class='form-control' output='bootstrap' urlparam='']
{
"required":0,
"validate_format":0,
"persist":1,
"default":["1-10"],
"options":[
{"value":"1-10","label":"Employees: 1-10"},
{"value":"11-50","label":"Employees: 11-50"},
{"value":"51-200","label":"Employees: 51-200"},
{"value":"201-500","label":"Employees: 201-500"},
{"value":"501-1000","label":"Employees: 501-1000"},
{"value":"1001-5000","label":"Employees: 1001-5000"},
{"value":"5001-10,000","label":"Employees: 5001-10,000"},
{"value":"10,001+","label":"Employees: 10,001+"}
]
}
[/cred_generic_field]

If possible, it's probably a good idea to turn off error, warning, and notice displays on the live site.

#623255

All good now thanks to Christian!