Skip Navigation

[Resolved] Error uploading image to CRED form

This thread is resolved. Here is a description of the problem and solution.

Problem:
When uploading an Image with CRED I receive a validation error from one of my Custom CRED API validation codes.
(before submitting even the form)

Solution:
Update to the latest CRED Version (and the rest of Toolset if used.)

This support ticket is created 8 years ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by natashaB 8 years ago.

Assisted by: Beda.

Author
Posts
#381491

I am trying to: Upload an image via CRED form

I visited this URL: hidden link - login using 'usernametest1' and password 'testing'.

I expected to see: I tried to attach an image to the field, but it has a js alert come up stating last_name missing. The last_name field is already entered though, so I'm not sure why its pulling that up.

As mentioned in a previous support thread, I'm using a function to validate the form data :

add_filter('cred_form_validate_605', 'validate_form_with_id_605');
function validate_form_with_id_605( $data ) {
	    list($fields,$errors)=$data;
	    if (empty($fields['first_name']['value'])) {$errors['first_name'] = 'Missing';}
	    if (empty($fields['last_name']['value'])) {$errors['last_name'] = 'Missing';}
    	return array($fields,$errors);
}
#381717

Your Toolset Suite is out of date.

It would be good that you first update your Toolset to it's latest version. Can you do this please?

❌ Be sure to backup your database first before you proceed! ❌
⌥ You can use a plugin for this if you like.
I often use the Duplicator plugin for this purpose.
See: http://wordpress.org/plugins/duplicator/

If then the issue persist, might I know it you have perhaps WP Debug Active?

There is a similar BUG in CRED, which is solved in the upcoming release, which produces a similar issue.

But only if WP Debug is active.

Please don't hesitate to inform me in case the issue persists

Thank you for your patience.

#381728

I have updated and tested a couple of times and it appears to be working correctly now, thank you.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.