• Resolved silver3d

    (@silver3d)


    Hi,
    i put a form with a number fields called “Cellulare” but after the registration in the back-end, the user have the wrong number in “Cellulare” fields.
    It’s always the same number for every user no matter wich value i put in the form fields.

    Any ideas?
    Thanks

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Saroj Shah

    (@wpeverestsupportrep)

    Hi @silver3d,

    Would you please clear the browser’s cache/cookies once and see if the issue still persists?
    I hope it helps. If you have any questions, please feel free to ask.

    Regards!

    • This reply was modified 5 years, 5 months ago by Saroj Shah.
    Thread Starter silver3d

    (@silver3d)

    Hi, yes the problem is still there.
    User are able to register but on the back end their phone number is not saved…

    I try to reinstall the plugin but the issue remain.

    Saroj Shah

    (@wpeverestsupportrep)

    Hi there,

    Sorry for the late response. This issue requires proper testing for which, I request you to contact our developer team. You can contact them here: https://wpeverest.com/contact/ so that they will try to replicate the issue on your site and provide you the fix ASAP.

    Regards!

    Hi, i fix this with a funcioon.

    add_action( 'user_registration_after_register_user_action', 'ur_update_billing_number', 10, 3 );
    function ur_update_billing_number( $valid_form_data, $form_id, $user_id ) {
    	$billing_number = '';
    	if ( isset( $valid_form_data['billing_number'] ) && ! empty( $valid_form_data['billing_number']->value ) ) {
    		$billing_number = $valid_form_data['billing_number']->value;
      }
      if ( isset( $valid_form_data['billing_neighborhood'] ) && ! empty( $valid_form_data['billing_neighborhood']->value ) ) {
    		$billing_neighborhood = $valid_form_data['billing_neighborhood']->value;
    	}
      if ( ! empty( $billing_number ) ) {
    		update_user_meta( $user_id, 'billing_number', $billing_number );
      }
      if ( ! empty( $billing_neighborhood ) ) {
    		update_user_meta( $user_id, 'billing_neighborhood', $billing_neighborhood );
    	}
    }
    • This reply was modified 5 years, 5 months ago by lucasl9.
    Thread Starter silver3d

    (@silver3d)

    Cellular numbers are too high for the “number input fields” so i used a text area instead.

    The function above copy data from the fields billing_number and billing_neighborhood (both text fields) to the correct place, user_meta.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Number fields doesn’t register the right value’ is closed to new replies.