locked
Some field(s) in a InfoPath form that does not allow changes once submitted RRS feed

  • Question

  • Hi All,

    [Scenario] I have a scenario as follows: A InfoPath form that contain 3 controls, in which one of them is a repeating section containing 1 text field, one is a text field and another one is a Date Picker field. I wish to dis-allow users from alter existing data in the repeating section but they can still alter the data in text field and the Date Picker field if they open the submitted form to edit.

    [Q1] May I ask if InfoPath form allows forms owner to create repeating section that allows user to input their information and once the user submit the form, no changes are allow (only the admin or forms owner can edit. As describe above, the user can still open the form but they can only alter the data in text field and the Date Picker field)?

    [Q2] As for those repeating section with empty text field, it will be auto deleted?

    [Q3] If such functionality exist, does such functionality only apply for repeating section or it can also apply to other fields such as text fields, checkbox field, drop-down list and so on.

    [Q4] If such functionality does not exist, are they other alternative ways that I can explore?

    Thanks.

    Wilson

    Friday, September 2, 2011 4:13 AM

All replies

  • Q1: Yes

    Q2: No

    Q3: It can apply to other types as well.

    The way I do this is to add another valur to your form to track the status of the form. I usually call this value "FormStatus", and I set it's default value to be "New" or something like that. When the form is submitted I change the value to be something else, depending on the form this might be something like "Draft", "Submitted", "Approved", "Completed" etc.

    You can now use conditional formatting rules to disable any controls that you do not want to be changed. Select the repeating section that you want to disable. Bring up the 'Rules' task pane and press 'New' to add a new formatting rule. Add a condition to check when your FormStatus field is not equal to "New" and then tick the box that says 'Don't allow users to insert or delete this control'. That will prevent users adding or deleting rows. You can doo the same for normal text fields, date pickers etc, they will have an option to 'Disable this control', so that they will be displayed, but greyed out and can  not be changed.

    Formatting rules are very powerful and worth spending some time getting familiar with.

     

    Q4: N/A       :)

    Friday, September 2, 2011 10:57 AM
  • Q1: Yes

    Q2: No

    Q3: It can apply to other types as well.

    The way I do this is to add another valur to your form to track the status of the form. I usually call this value "FormStatus", and I set it's default value to be "New" or something like that. When the form is submitted I change the value to be something else, depending on the form this might be something like "Draft", "Submitted", "Approved", "Completed" etc.

    You can now use conditional formatting rules to disable any controls that you do not want to be changed. Select the repeating section that you want to disable. Bring up the 'Rules' task pane and press 'New' to add a new formatting rule. Add a condition to check when your FormStatus field is not equal to "New" and then tick the box that says 'Don't allow users to insert or delete this control'. That will prevent users adding or deleting rows. You can doo the same for normal text fields, date pickers etc, they will have an option to 'Disable this control', so that they will be displayed, but greyed out and can  not be changed.

    Formatting rules are very powerful and worth spending some time getting familiar with.

     

    Q4: N/A       :)

    Thanks Steven.

    I have further questions as follows:

    Q1: You mention that you create a value called 'FormStatus' to track the status of the form. May I know if the value is a textfield or ... ?

    Q2: You mention that when the form is submitted, you change the 'FormStatus' to another value. May I know how you detect the form is submitted ?

    Q3: I have tested the conditional formatting rules. I notice that once the 'Don't allow users to insert or delete this control' is ticked, I can no longer add any additional section anymore. (Actually, I wanted something like that but only apply to old rows. The user can still add or delete rows before saving. After saving the form or submitted the form, they can no longer add or delete existing rows *but* they can still add new rows or delete their new rows.

    e.g. At 10am, user create 2 rows and save the form. At 10:10am, the user come back and create two more rows and did not save the form yet. (At this time, the user cannot modify the content in the 2 rows he created at 10am.) At 10:15am, the user delete one of the row he created at 10:10am and save the form. (Yes, the user can delete or even add new rows as long as he did not save the form). At 10:30am, the user come back and wanted to modify the 3rd row (which is the one he created at 10:15am.) (No way, since the form is already saved at 10:15am, the 3rd row cannot be modify and same goes for 1st and 2nd row)

    Q4: From what I know, InfoPath form can be published as a source files. I was wondering if it is possible to edit the source files to fit the above requirement? (If this method is possible, I would certainly hope you can guide me or show me how cause i am just a InfoPath beginner.)

    Thanks.

    Wilson

    Monday, September 5, 2011 4:12 AM