Jump to content
DesiLogi

Submit Form: Show Message With Same Form Setting

Recommended Posts

How do I, on a Submission Form, show a successful submission message when using 'Same Form' for the destination? 

 

I am using for these particular forms the iFrame deployment in a modal. When 'Same Form' is clicked it does not close the modal but flashes the form (submits data) and then stays open. This would be ok if I can at least show a 'successful submission' message so the user knows their data was saved.

 

The problem is that if I use Close Form the modal stays open- I can't close the modal via the Caspio datapage.

Share this post


Link to post
Share on other sites

Basically, if we can get to whatever the Submit code is and run it along with some other javascript so that, upon Submit, the datapage both a) shows a 'successful submission' message and B) reloads the datapage form below it so the user can continue to enter records. 

Share this post


Link to post
Share on other sites

Hi DesiLogi !

 

You can add this script into the Footer of your Submission Form : 

<SCRIPT LANGUAGE="JavaScript">

function myFunction()
{
alert ('Form was submitted')
}
document.getElementById("caspioform").onsubmit = myFunction;

</SCRIPT>

When you click on Submit Button, you will see a small notification message that the form was submitted. 

 

Good luck 

 

Aurora  ;)

Share this post


Link to post
Share on other sites

 

On 10/21/2015 at 6:23 PM, Aurora said:

Hi DesiLogi !

 

You can add this script into the Footer of your Submission Form : 


<SCRIPT LANGUAGE="JavaScript">

function myFunction()
{
alert ('Form was submitted')
}
document.getElementById("caspioform").onsubmit = myFunction;

</SCRIPT>

When you click on Submit Button, you will see a small notification message that the form was submitted. 

 

Good luck 

 

Aurora  ;)

 

I have the up to date version of this code which is friendly with AJAX loading of the datapages:

<script type="text/javascript">
function customAlert() {
alert ('Form was submitted');
}
document.addEventListener('BeforeFormSubmit', customAlert);
</script>

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...