• Resolved josemetal7

    (@josemetal7)


    Hi there! i’m trying to hook with “user_register” to catch a RADIO-GROUP value to execute some PHP (basically adding a capability), but i can’t figure which $_POST attribute is getting, the RADIO-GROUP info is this:
    Label: test_rg_label
    Meta Key: test_rg_metakey
    Options: str1 and str2

    I tried with isset($_POST[‘test_rg_label’]) and isset($_POST[‘test_rg_metakey’]) with no luck, no matter what code i insert after the if, so the form must have another key for the $_POST.

    Thanks in advance!

    • This topic was modified 6 years, 4 months ago by josemetal7.
Viewing 1 replies (of 1 total)
  • Plugin Author easyregistrationforms

    (@easyregistrationforms)

    Hello @josemetal7,

    Thank you for contacting us. You can use our hook “erf_user_created” which is called after user registration. Example:

    add_action(‘erf_user_created’, ‘user_created’, 10, 3);
    function user_created($user_id, $form_id,$sub_id){
    // Here you will be able to access $_POST
    }

    Regarding the $_POST key, It is generated dynamically by our plugin. As of now, there is no way to get the field name from the configuration. You can inspect it in the browser console by checking the field’s name.

Viewing 1 replies (of 1 total)

The topic ‘user_register hook’ is closed to new replies.