Contents tagged with "Forms"

  • Export Form Submissions to CSV with JavaScript

    Orchard 1.10 gives you the opportunity to export Contents and Form Submissions to XML with the built-in module Import Export. If you want to change this functionality, you have to create a module that will export to CSV. But there is a quicker way with my best friend JavaScript. 

    First, we will create an export button that will appear only in the Form Submissions Page:

    var url = window.location.href.toString().toLowerCase(); if (url.indexOf('submissionadmin') > -1) {    $('<a/>', {        id: …

    Read More 
  • Disable Submit Button on Form Submit

    When a form is being submitted, sometimes, as the users are waiting, they might click more than once the submit button. This may cause duplicates submissions. 

    First, we will disable the submit button when the form is valid.

    $('form').submit(function () {    if ($(this).valid()) {        $(this).find('button[type="submit"]').prop('disabled', true);    }});

    We can make it more beautiful if we add a loader as the user is waiting. For the loader in this example, I used FontAwesome Fonts. 

    $(' …

    Read More