How to enable fields to specific users only.

  • rwaldenjr
    Asked on August 20, 2019 at 1:44 PM
    Thanks for notifying me about this update! It looks like a great first step. However, what I was hoping for was the ability for clients to still view their forms without a password, just not be able to edit them. Users' personal data will be displayed in the forms when they log in to my site. But, I only want certain people to be able to edit the data, primarily my staff. Is that possible with the new update?
  • David JotForm Support Manager
    Replied on August 20, 2019 at 1:56 PM

    I believe that this is already possible through conditions: https://www.jotform.com/help/371-How-to-Enable-Disable-Fields-Using-Conditional-Logic

    Example:

    1566323575condition Screenshot 10

    1566323591condition 001 Screenshot 21

    1566323611condition 002 Screenshot 32

    Please test my form example: https://form.jotform.com/92315056901957

    The rest of the form fields will be available only if the IDs CE001 or AB002 are entered.

    Hope this helps.

  • rwaldenjr
    Replied on August 20, 2019 at 8:12 PM

    BDavid -

    That could work! I assume your example shows two different "Employee IDs" indicating that more than one person can have access to edit the form (i.e., the client, and an employee)? Could the default blank form fields be automatically filled upon user login by pulling data from a table record based on that person's unique key value (e.g., their "user ID"), and then use your conditional logic to determine who can edit the fields?

  • Kevin Support Team Lead
    Replied on August 20, 2019 at 9:49 PM

    Yes, you may use the spreadsheet to form widget for both purposes, hide/show the fields and pre-fill them. Here's a guide with more details about how to use this widget: https://www.jotform.com/help/442-How-to-Use-the-Spreadsheet-to-Form-Widget 

    However, this will require a spreadsheet where you have the data stored, otherwise, you would need to use several conditions to insert the data in the fields based on each single typed in code. 

    I hope this helps. 

  • rwaldenjr
    Replied on August 20, 2019 at 10:18 PM

    Kevin_G -

    Could you please explain more about your last statement, "...need to use several conditions to insert the data in the fields based on each single typed in code", and possibly use an example or sample code?

    Thanks

  • Jed_C
    Replied on August 21, 2019 at 12:21 AM

    Without using the spreadsheet to form widget, you'll be using conditional rule to insert data into the field.

    ex.

    1566361204update calculate Screenshot 10

    If you use spreadsheet to form widget, you don't need to create a condition to insert value into the fields.

    Please review our guide here https://www.jotform.com/help/442-How-to-Use-the-Spreadsheet-to-Form-Widget so you can have an idea.

    Let us know if you have any questions or if you need further assistance.