We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this even possible?
The text was updated successfully, but these errors were encountered:
You can get the errors using the following code:
if( class_exists('CTCT_Process_Form') ) { $errors = CTCT_Process_Form::getInstance()->getErrors(); }
Then you can loop through the returned errors array, which is an array of WP_Error objects:
WP_Error
$error_output = ''; foreach ($errors as $error ) { /** * The input ID is stored in the WP_Error error data. * @see CTCT_Process_Form::checkRequired() */ $error_field_id = CTCT_Form_Designer_Output::get_field_id( $ProcessForm->id(), $error->get_error_data() ); $error_label_for = ' for="'.esc_attr( $error_field_id ).'"'; $error_output .= '<div><label'.$error_label_for.'>'.$error->get_error_message().'</label></div>'; }
There's not a non-codey way to do this yet, but I think it's a good idea.
Sorry, something went wrong.
No branches or pull requests
Is this even possible?
The text was updated successfully, but these errors were encountered: