RE: Is it possible to populate the fields of a Form before presenting it to the

thumbnail
Ivano Carrara, modified 3 Years ago. Expert Posts: 350 Join Date: 7/3/05 Recent Posts

An example: I would like to create a form with Multiple Selection elements.

Each Option must contain a value produced by a backend service that produces a list of values.

 

Thank you in advance for any clarification.

thumbnail
Russell Bohl, modified 3 Years ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

Hi Ivano, you can populate a Select from List field in the Forms application with a REST Data Provider. By default the Select from List field allows only one selection, but you can go into its Advanced properties and set it to allow multiple selections. This is what it looks like:


 

If you need to write your own data provider, see the developer documentation.

thumbnail
Ivano Carrara, modified 3 Years ago. Expert Posts: 350 Join Date: 7/3/05 Recent Posts

Hi Russel, thank you very much. Your comment was very clear and helpful.

Do you think it is possible to populate other types of fields (text, numeric, etc.) with values produced by REST Data Provider?

thumbnail
Russell Bohl, modified 3 Years ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

It should be possible. The Select form List field is the only one with the native configuration to populate from a data provider, but you should be able to use the Autofill Rule to populate a text or numeric field. 

For example, use a country data provider, I should be able to configure an input (like, have the User enter their country) and then autofill a text field with the region (e.g., Europe). I tried this just now and couldn't get it to work though. I'll ask the team if there's a bug and get back to you.

thumbnail
Russell Bohl, modified 3 Years ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

Ivano, after discussing with the team I filed this bug ticket: LPS-152074. It contains steps that should work to autofill a text field with a data provider. Ovciously since it's a bug ticket the steps are not currently working, so let's hope the team can pick up this ticket soon.

thumbnail
Ivano Carrara, modified 3 Years ago. Expert Posts: 350 Join Date: 7/3/05 Recent Posts

Hi Russell,

Thank you very much for your support on this.

Ivano