How do I allow Joomla registered users to edit their submission using Submission ID?

  • cedaradvisors
    Asked on August 6, 2015 at 2:08 AM

    I have created a form for current clients to provide their current situation details.  I'd like to allow them to create a username and password on my Joomla 2.5 website and access the form as a registered user.  Since I only want current clients to access the form, I can open the form, input their names, submit the form, and get the Submission ID for a specific client.

    I can then send the clients the Edit Submission link so that they can complete the form.  There is a "Is the questionnaire complete (yes/No)" question at the end of the form, with a default answer = "no".  I added a "save form" button at the beginning of the questionnaire to allow clients to save the form and continue at a later date, using the Edit Submission link. When they are done, they answer "Yes" to the "is the questionnaire complete" and receive an Auto Responder message.

    This approach works, but I would like to be able to enable client to have a Joomla user name and password as an extra layer of security.

    I'm assuming that for this to work I need to associate a Joomla registered user with the Submission ID.  I've got the form working using the Jincludes method. Any suggestions?  One potential solution is to have the client enter their username, password, and submission ID, and then build the form edit URL based on that info.

     

     

  • Boris
    Replied on August 6, 2015 at 3:37 AM

    I'm not sure if this is possible with JotForm, because:

    1. The submission ID is unique per submission, and is assigned by our system. In order to have it in your database, a submission would already need to be created beforehand - as you are doing manually now.

    2. We do not allow collecting of usernames or passwords over our forms, as can be seen in our terms. So you would have to ask for this information with your own system.

    What I believe you can do on your website, is to put a page with your form embedded into it behind a login page. Then, serve them different form embedded with submission ID depending on their login credentials on your site. Everything else would be as you have it right now - you need to pre-create submissions that your users can then fill out with their edit link.

    I hope this helps.

  • cedaradvisors
    Replied on August 6, 2015 at 8:05 PM

    Boris, we agree on the approach and requirements. 

    I have minimal coding skills, but found this link: http://stackoverflow.com/questions/11811782/form-value-creates-a-url

    I modified the code as follows, and it seems to work.   There is no error handling, though.  I'm open to other suggestions. 

     

    <script>

    function process()

    {

    var url= "http://submit.jotform.us/form.php?formID=52025303403135&sid=" + 

    document.getElementById("url").value + "&mode=edit";

    location.href=url;

    return false;

    }

    </script>

    <form onDISABLEDsubmit="return process();">

    Client ID: <input type="text" name="url" id="url"> <input type="submit" value="go">

    </form>

  • Sammy
    Replied on August 7, 2015 at 3:24 AM

    The above approach appears okay, you should perhaps add a check for blank user id i.e

    if(document.getElementById("url").value == "")
    {
     alert("empty");

    return false
    }