• Resolved kalleaume

    (@kalleaume)


    I have edited my default registration form to include the extra fields ‘first name’ last name’ and ‘organisation’, following the instructions here.

    I have then created an alternate registration form by following the instructions here. This is a more basic form and only includes the ‘first name’ and ‘last name’ fields. This second form does not include the ‘organisation’ field. However, when a user completes this form, it is giving the validation error: “Please enter your organisation”, even though the ‘organisation’ field does not display on this form.

    How can I remove the validation check for the ‘organisation’ field on the alternate registration form?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    In the registration_errors hook callback, you’ll need to check which form is being submitted:

    if ( 'your-custom-form' == tml_get_form()->get_name() ) {
        // check errors
    }
    Thread Starter kalleaume

    (@kalleaume)

    Thanks for your reply! I am not sure whereabouts I should be adding this. Should I add it directly after this line of code below?

    add_filter( 'registration_errors', 'validate_client_registration_form_fields' );
    • This reply was modified 1 year, 5 months ago by kalleaume.
    Plugin Author Jeff Farthing

    (@jfarthing84)

    No, within the function definition of validate_client_registration_form_fields(), around the if empty blocks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove validation criteria in alternate registration form’ is closed to new replies.