Support » Plugin: Usernoise modal feedback / contact form » How to create custom fields with this plugin?

Viewing 2 replies - 1 through 2 (of 2 total)
  • how to create custom field with usernoice plugin.

    You can use code structure like below.

    add_action('un_feedback_form_body', 'un_feedback_custom_field_add', 10);
    function un_feedback_custom_field_add(){
    	?>
    	<input type="text" name="abc" value="" id="?" maxlength="30" />
    	<?php
    }
    
    add_action('un_feedback_created', 'un_feedback_custom_field_save', 10, 2);
    function un_feedback_custom_field_save($id, $params){
    	if( isset($params['abc']) ){
    		update_post_meta($id, 'abc', $params['abc']);
    	}
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to create custom fields with this plugin?’ is closed to new replies.