Jump to content
  • 0

Pop-up Form on Submit


Go to solution Solved by IamGroot,

Question

Hello everyone,

I am trying to create a submission form with four fields, NAME, EMAIL, CONTACT PERSON and RESUME(File Data type).

Now I want to have a user interaction that will confirm if the user wants to proceed  when he/she submit a record. e.g.  "Are you sure you want to apply for this Position?"

Any help would be much appreciated.

Many Thanks!

Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 1
  • Solution

Hi @Perzival,

You can create another DataPage and add HTML Block with the linked of the user confirmation, here some sample code for pop-up form:

Quote

<a onclick="window.open('DataPageURL','popup','width=307,height=341,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">Click to confirm</a>

For you to better understand the process, you can go through Caspio's How-to:

https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/add-an-option-to-a-public-facing-dropdown/

https://howto.caspio.com/tech-tips-and-articles/common-customizations/how-to-add-a-required-i-agree-option-to-your-form/

I hope this helps you :) 

Link to post
Share on other sites
  • 1

Hello @Perzival,

 

If you want your users to be prompted with a Yes/No prompt box, all you have to do is paste this code in the Footer Section of your DataPage Configuration.

<script>

var message = 'Sure you wanna submit?';

// for AJAX Disabled Submissions use this
document.querySelectorAll('form').forEach( function(elem){
elem.onsubmit = function() {

return confirm(message);

}
});
// END

// for AJAX Enabled Submissions use this
document.addEventListener("BeforeFormSubmit", function (event) { 

if (!confirm(message))
event.preventDefault();

});
// END

</script>

Works in DataPages: [Submission Form, Single Record Update, Details DataPage (NOT DETAILS DRILLDOWN!)]

 

Hope this helps,

DN31337

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
Answer this question...

×   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...