How to force the senders screen to scroll to the Success Message (on same page) after message has been successfully sent?
I have a Formit form displaying at the bottom of the page.
The form can send and can be received.
The Success Message displays as expected in the form.
However, the page resets to the top of the page, meaning the sender has to scroll all the way down the page to see the Success Message.
Is there any solution to this?
My concern is the sender may not scroll and just abandon the page after form submission, or worse just refresh the page so the form sends a second time.
My Formit code below:
&hooks=`spam,email`
&emailTpl=`emailTPL`
&successMessage=`Your comment has been submitted successfully, please check your email.`
&emailTo=`[[+email]],someone @ email. com`
&emailFrom=`someone @ email. com`
&emailSubject=`[[+name]] Sent Us A Message`
&clearFieldsOnSuccess=`1`
&validate=`nospam:blank,
name:required,
email:email:required,
contactemail:blank,
adsize:required,
subject:required,
text:required:stripTags,
confirmemail:blank`
]]
[[!+fi.validation_error_message:notempty=`<p>[[!+fi.validation_error_message]]</p>`]]
[[!+fi.successMessage]]
@jamesjazz, since you’re already using a style attribute, you could add padding to the top of the paragraph instead of breaks – I think it’s more flexible.
For example:
&successMessage=`<p style="color:green; padding-top: 48px;">Your comment has been submitted successfully, please check your email.</p>`
I don’t know your setup, but another method would be to use a class and put the style rules in a stylesheet.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.