question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem pre-filling data grid elements

See original GitHub issue

I have a data grid element where people can add x number of text fields, while I can pre-fill basic fields the grid does not behave in the same way when trying to pre-fill some of the form fields on page load.

  var form = new FormioForm(document.getElementById('formio'));
  form.src = 'path-to-form';
  form.submission = {
      data: {
        addressStreet: '123 Something Street', // works
        addressSuburb: 'Somewhere', // works
        addressPostcode: '40000', // works
        licencePlates: [
            {
                textField: "abc123"
            },
            {
                textField: "another"
            }
        ]
      }
    };

The address fields prefill and when doing a console.log on form.submission after adding some data grid items through the form itself it comes back in the same format as the pre-fill object.

Does the data grid component have any pre-fill ability at present? Is it limited to basic fields?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cmcortezcommented, May 28, 2020

@mojtaba-khallash we are unable to replicate your issue, as part of a support package we would be happy to assign a developer to meet with you and go over the issue with you. Please contact support@form.io if you are interested.

1reaction
travistcommented, Jul 26, 2017

This shows an example of a data grid being pre-populated with data.

http://formio.github.io/formio.js/app/examples/datagrid.html

Are you experiencing something else where something like this usecase is not working?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create response with grid item is not working ... - Stack Overflow
I get an error when the prefilled URL function attempts to create a response from the grid item.
Read more >
Data Grid widget: Capture data entered on form fields and ...
Can I use the Data grid to capture the data entered into the form by the user and have it display to them...
Read more >
How to Pre-fill a Form - Overview - Airtable Support
The "YOURFIELDNAME" and "YOUR_RECORD_ID" values are meant as placeholders. You will need to match the field names and record ID values to the ......
Read more >
Field Layout, Matrix, Likert Scales, Grids, & Columns
Select your question and click the Options button to open the editing sidebar. Select Presentation from the sidebar. Select your layout preference from...
Read more >
Data Grid | Mendix Documentation
A data grid shows a list of objects in a table format. For example, a data grid can show all the program items...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found