Ready to get started?Download WordPress


User Submitted Posts
[resolved] show error message or success message to user (5 posts)

  1. WordPress.Net.In
    Posted 1 year ago #


    I am using this plugin on a page where a lot of content and user has to scroll down to fill the form. But when user fill the form and either error message or success message is displayed the browser doesn't focus user to that place, which is actually just above the form, and user can't make sure if his submission is success or has any error.

    I want to show the message to user, i try get focus using javascript but the page is reload and i am not able to focus on message.

    Is there any help.


  2. Jeff Starr
    Plugin Author

    Posted 1 year ago #

    Hi, the plugin passes a GET parameter on success or error that may be used to customize your theme however you like, for example:

    <?php if($_GET['submission-error'] == '1') { ?>
    	<div id="usp-error-message"><?php echo $usp_options['error-message']; ?></div>
    <?php } ?>
    <?php if($_GET['success'] == '1') { ?>
    	<div id="usp-success-message"><?php echo $usp_options['success-message']; ?></div>
    <?php } ?>
  3. WordPress.Net.In
    Posted 1 year ago #

    Thanks for quick reply. I try but not get success

    I use this javascript code, please check if I am wrong anywhere

    <script language="JavaScript">
      function setFocus() {

    And this code on submit button

    <input name="user-submitted-post" type="submit" onClick="setFocus()" value="<?php _e('Submit Post'); ?>">

    And the last code for focus on text box

    <input name="user-submitted-title" id="text" onFocus="setFocus()" type="text" value="" placeholder="<?php _e('Post Title'); ?>">


  4. Jeff Starr
    Plugin Author

    Posted 1 year ago #

    Not sure about the JavaScript, but the PHP in my previous reply works like a charm.

  5. MarketRaisen2
    Posted 10 months ago #

    Any idea how to remove these completely?

    Or better still keep them without hiding the form?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic