Vipin Singh
Vipin Singh

Reputation: 1

Access Key-Value pair from submission data in FormIO not part of form designed in React application

I am using FormIO in my project developed in react. I am facing two problems here:

  1. I want to add couple of key-value pair (i.e. logged-in username, logged-in user email) in code while passing the submission to formio and these fields aren't part of Form designed using formio.

Later, I want to add a field (user name) in form that will have the value using above added key-value pair from submission json. enter image description here

I have added calculated value as enter image description here

But, when I am launching the form value is not shown in the field and it is showing as blank.

  1. There are multiple pages in form and I am not using the default formio pagination. I am using custom pagination button and passing the first page json to formio along with its submission data, and when user clicks on 'Next' button then next page json and submission passed to form io. This is working fine. But, how can I access the key-value pair available in page1 to next pages as I am passing only respective page formJson and submission data to FormIO.

What is the best way of doing this so that values are available and visible on the form.

I was trying to add the logged-in username, logged in user email as hidden fields but that will be too much as if I want to add more fields, I need to update the code again and again.

Upvotes: 0

Views: 38

Answers (0)

Related Questions