Problems with Additional Form Fields


Home Forums Front End PM PRO Problems with Additional Form Fields

This topic is: Resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26924
    David
    Participant

    Hi Shamim,

    I am using many additional form fields and checkboxes which appear by javascript controlled button press when required by the user. I am having problems since the recent updates where the page no longer refreshes on message send. This means that the when the user completes the additional form fields and presses SEND MESSAGE, the message is sent but the extra form fields remain visible with the information still showing inside them. Before the latest updates, the page refreshed to its normal state and removed this information. This can be confusing to the user as although they receive the confirmation message that the message has been sent, it still shows all the information on the screen as not having been sent.

    Can you help with a simple solution to this problem that would remove all additional form fields from the page, and remove the information inside them after send message is pressed?

    Thanks for your help in this matter.

    #26955
    Shamim Hasan
    Keymaster

    You can use following code, it will redirect user to messagebox page after message sent.

    add_action( 'fep_posted_action_after', function( $action ){
    	if ( 'newmessage' == $action && count( fep_success()->get_error_messages() ) > 0 ) {
    		$_POST['fep_redirect'] = fep_query_url( 'messagebox' );
    	}
    });
    
    #26960
    David
    Participant

    Thanks very much, have changed ‘newmessage’ to ‘reply’ as the extra fields are attached to the reply form and all is working great now.

    Thanks for the quick response!

    #43895
    David
    Participant

    Hi Shamim,

    I am using this code now for the shortcode-newmessage. However, I would like to make it specific to the page or post that I am on. This is because I am using the shortcode in three different places and I only want to redirect from one of those. Is it possible? I tried adding “is_page(‘test’) but it didn’t work.

    Thanks for any help.

    #43934
    Shamim Hasan
    Keymaster

    It is possible but needs custom code. You can add a hidden field for shortcode newmessage and pass page/post id. Then you can use that id to determine what action to take

Viewing 5 posts - 1 through 5 (of 5 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.