Listen to Select Field Changes And Set Custom Name in Text Field

In this guide, we will share an example of how to listen to Select list field changes and set the selected value with any additional text into a specific text field.

image
// Listen to Formyoula field changes based on Id or label
window.formyoula.form_fields[ 'Select List' ].on( 'all', function() {
	// Get select value
	var new_text_field_value = this.get( 'value' );
	// Add extra text to the new value
	new_text_field_value = new_text_field_value + ' ' + moment().format('LLL');
  // Set the text field value
  window.formyoula.form_fields[ 'Text Field' ].set( { value: new_text_field_value } );
} );

For any questions, please contact us - [email protected] or the Formyoula in-app chat 🙂