Site icon Anthony Carbon

How to track your password to be sent in your notification?

Using Gravity Form, before I having a hard time getting the `Password` value to be included in my notification email. I have read this post How to Include a Password Field in a User Notification with Gravity Forms but it seems not working perfectly to my end.

I have created an alternative way of tracking the `Password` by adding a hidden field and a little jQuery codes to save it into the Password hidden field.

To make more understandable, please see the images below.

Step 1 – add a Hidded field and get the field ID. In this example the field ID is `10` and the front-end output will be `##input_2_10`. The `2` number is the form ID your Gravity Form.

Step 2 – add a HTML Block field and paste the jQuery codes. Make sure to change the form ID and the hidden field ID in the example.

<script>
jQuery( document ).ready( function( $ ){
	$( '.gform_wrapper input[type="password"]' ).on('keyup change', function (){
		$( '.gform_wrapper #input_2_10' ).val( $( this ).val() );
	});
});
</script>

Step 3 – the final process is append the hidden password to email notification. The name is base on what is the name on your hidden field name.

Hope this blog will help you. Feel free to drop a comment if you don’t understand.

Exit mobile version