• Resolved kidznc

    (@wsp-kk)


    Dear UM team:

    We’re presently running some tests (on a locally hosted backup of the above site) of the Ultimate Member hidden field form code in our functions.php, per this snippet: https://docs.ultimatemember.com/article/128-add-a-hidden-field-to-your-register-form

    However, we have two different registration forms – one for instructors, another for students – and we need to apply this extra hidden data to only one of the forms. In what manner would you recommend adjusting these hooks to apply the hidden fields only to a given form_id?

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • missveronica

    (@missveronicatv)

    @wsp-kk

    In the first function you should use $args['form_id']
    and in the second function $form_data['form_id']
    to test for the Registration form ID.

    Example

    if ( isset( $args['form_id'] ) && $args['form_id'] == '1234' ) {
    ...
    }
    Thread Starter kidznc

    (@wsp-kk)

    Fantastic, works perfectly. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.