How to conditional display fields on a user input form (and dynamically look up helper text / display titles)

Hi!

Hoping to get a bit of guidance around how to setup a form on the site I’m building out.

Core concept for this section is that you’d create a policy which contains 10-15 parameters, with that policy then saved in the database to be looked up at a later date.

Idea would be that you first select a policy “type” (of which there are four - 1,2,3,4) at the top of the page. Most of the parameters are common between different policy types, but there are are some differences and need the form to display only the relevant ones depending on the initial policy type selection.

Looking for the parameter entry part to be laid out with the different parameters entered in rows (i.e. as below)

image

Key questions

  • I’m looking to add on a description for each field, pre-populate some with defaults, have some as free text, some as drop downs, some as on/off (or boolean) values
    • Is there any way I could achieve this from a lookup table rather than setting manually for each cell in WeWeb?
      • Table I’m looking to populate (in XANO) has 20 or so columns

    - I’ve written out how I’d want it to work in a GoogleSheet for each of those XANO columns  - extract shown in screenshot below

  • Somehow want to be able to have the ‘WeWeb display column name’ (second column) as what’s displayed to the user, the ‘helper text’ appear as mouseover popup, ‘display for policy types’ list specify whether the field appears etc

  • Any solutions for getting this table into either WeWeb or XANO and effectively reading from the relevant column to determine what to display on the form?

    • Any inspiration for the best way of laying out a form like this?
      • Fairly new to WeWeb and used Datagrids’s pretty much exclusively so far - don’t think that’s going to work for this

Any help much appreciated!

Thanks.

Nick

Looks like you need to set up your own grid layout and then populate the cells with all the ui elements that you need (select, input ecc) and show them conditionally on your parameters.

For a simple example of a grid layout look here Dynamically structured data grid element - #2 by dorilama

Thanks dorilama! Will give it a try

1 Like

Let me know how it goes :slight_smile: