Collect user data form

#collect#form#user data

We created a simple shortcode to create a form that collects user data.



  • id (required) – The banner ID you add the shortcode to.
  • title – The form title.
  • description – The form description.
  • btn_text – The text for the submit button.
  • bg_image – The URL for the background image (left side).
  • hidden_fields – list of hidden form fields (field_name_1:value_1, field_name_2:value_2).
  • style – style attributes to customize the form colors.
  • input – The main input field data (type:email, name:input-name, class:custom-class, placeholder:Enter your email).

Handle form data

When a user submits the form you can receive the data using the following filter:



add_filter( 'angwp_popup_result', 'your_function', 10, 1 );

your_function($data = array()){
  	// Do something with the $data
     $data = array(
		'id' => banner_id (int),
		'inputs' => inputs (array),
		'response' => 'Thanks!'
  	// Make sure to return the $data variable.
  	return $data;