Stop duplicate entries on a form

  • sara.benstead
    Asked on May 29, 2021 at 11:05 AM

    Hi

    I am collecting pupil information for new children starting at our school. Parents have to give emergency contact details for people other than themselves. Is there a way of making sure they don't put themselves in again under the emergency contact section?

    I was trying to use a condition that says if a parent's name is in the 'Name of Parent/Carer 1' field, it can't be added again in the 'Name of Emergency Contact 1' field. I can't work out how to do it.

    Thanks,

    Sara


  • Ahmed_S
    Replied on May 29, 2021 at 6:33 PM

    Hello Sara,

    The condition that you want to apply is very doable, IF field 1 IS EQUAL TO field 2 DO some action, but the issue here is that you are trying to apply the condition to a name field which can't apply a comparison because it consists of 3 separate fields so it can only check if it's filled or empty.

    1622326135 60b2bb77ca4db 3 Screenshot 10

    You can overcome this issue by applying the condition to other fields like Email or Mobile Number

    1622326457 60b2bcb969446 4 Screenshot 21

    Or if you still want to use the Name fields in the condition then you can do it with a workaround, you can use Calculation Widget field for each Name field and set it to be the same value of the corresponding Name field as the following screen cast, after that you can apply the condition between these Calculation fields as it will apply the comparison between the calculated values of each field.

    1622327070 60b2bf1e4538e screen Screenshot 32

    Please give it a try and let us know if you need further assistance we are happy to help.

  • sara.benstead
    Replied on May 30, 2021 at 7:02 AM

    Thank you so much. I have used the widget option (as well as adding some additional reminders to the form). Could you check I have done it correctly?


    Many thanks.


    Sara

  • Ahmed_S
    Replied on May 30, 2021 at 9:41 AM

    Hello Sara,

    I'm glad that you have managed applying this suggestion, I've checked your updated form and you've done it well, but you didn't set the Calculation Widget to get the value of the Name field, please follow the below screen cast for how to fix it, also you can check this guide to know more about using the Calculation Widget.
    How to Perform Form Calculation Using a Widget

    1622380887 60b39157541f6 screen2 Screenshot 10

    My only concern is the action that you set with the created condition, I don't know if you meant to choose to Unrequire the selected field, I've cloned your form and modified the condition and added SHOW / HIDE FIELD condition to hide the Submit button so the user can't proceed with submitting the form and to show the alert/reminder message as you can see in the below screen cast.

    You may check this guide to get more details about using conditions.
    Smart Forms: Conditional Logic for Online Forms

    1622380131 60b38e6387bdd screen Screenshot 21

    Here's how it will look like.

    1622381257 60b392c95558d screen Screenshot 32

    You can check the modified clone of your form in this link https://form.jotform.com/211493385788975

    You can also clone it to your account so you can review it in your Form Builder, please follow this guide for how to clone a form.
    How to Clone an Existing Form from a URL

    You can apply this solution for all the other Parent/Carer names fields.

    Please let us know if you need any further help with this form.

  • sara.benstead
    Replied on May 31, 2021 at 7:34 AM

    Hi Ahmed

    I really appreciate your help with this. I missed saving the conditions of the widget as the save button was off my screen! I've sorted that now and have tried to follow the steps to hide/show the alert and submit options, but the red alert is still showing on the form when I check it.

    I couldn't work out what I was doing wrong so decided to import and clone your version of the form. Unfortunately I get a message saying Unauthorised request. You don't have access to this form.

    1622460760 60b4c95822a28  Screenshot 10

    Can you please allow me access so I can see what I'm doing wrong?

    Thanks again.

    Sara

  • KrisLei Jotform Support
    Replied on May 31, 2021 at 8:56 AM

    Hello Sara,

    I have changed the settings on my colleague's form so that you can proceed in cloning his form.

    Let us know if you need further assistance.

  • sara.benstead
    Replied on May 31, 2021 at 4:21 PM

    Thanks for unblocking the form that you created. I've checked my form against your one, and it looks the same, but the red alert message is still showing on the form. If I disable the show/hide condition, the message doesn't show, but as soon as I add in the condition it shows on the form again. I can't work out what I am doing wrong. Can you please help?

    Thanks.

  • Michal_S Jotform Support
    Replied on May 31, 2021 at 7:41 PM

    Hello!

    The widget settings of your Calculation Widget used to compare the fields are a bit different than the one provided by my colleague - you added the Calculation Widget itself in the calculation instead of the fields:

    131202 1 Screenshot 10
    131203 2 Screenshot 21

    Please change your Form Calculation widget's fields to fields number 14 and 50 respectively.

    To do this, click on the Widget Settings button, remove the old field from the textbox in the settings, then click Add Field, choose field number 14 for the first widget and 50 for the second widget, then click on the field added in the textbox to turn it from 0-9 to A-Z.

    131204 3 Screenshot 32

    This should make your form work like the one supplied by my colleague.

    Please let us know if you require any further assistance.

    Thank you!

  • sara.benstead
    Replied on June 1, 2021 at 5:48 AM

    Thank you so much. I've got it to work now. Really appreciate all your help.