formio / angular

JSON powered forms for Angular
https://formio.github.io/angular-demo
MIT License
619 stars 464 forks source link

Select Componet Issue PreSelect value #228

Closed AnasHijazi closed 5 years ago

AnasHijazi commented 5 years ago

There are something wrong in select component i have array of JSON of object So i used URL as Data Source Type until now every thing it's ok .

I want now preselect on of these options, based on documention should be there are field called "value property" but it's not there .

there are any advice to solve this ?

jeriah-formio commented 5 years ago

Hello,

The ‘Value Property’ field has not been added to our beta site yet but is definitely on our backlog. This is available on our production portal at https://portal.form.io/ .

Let us know if you need anything else

AnasHijazi commented 5 years ago

@jhen1422 thank you for your response ,currently i use angular-formio version 3.8.0 it's latest version available in npm.

there are any workaround ,i have web service return array of JSON objects , now simply i want preselect one of these object when form load based on property in these object .

Please see the below video : https://drive.google.com/file/d/1stlmwF5aq11xrPbcEqeWe5L6oJBaegLm/view?usp=sharing

randallknutson commented 5 years ago

If you are using the Value Property option, you should be able to use the default value option to set the property value. For example, for your select field, if the Value Property is set to "value", you can set the default value to "BH" and it will select that one from the list by default.

AnasHijazi commented 5 years ago

@randalkuntson thanks for your response, The Value property available in beta website , currently I use angular-formio version 3.8.0 , how can get this feild property in my project

AnasHijazi commented 5 years ago

@randallknutson Reminder

travist commented 5 years ago

@AnasHijazi the Beta website just uses the core builder which is already available within the form manager module within this library. The documentation shows how this can be used within your own application.

AnasHijazi commented 5 years ago

@travist i can't understand you , i have to get component select manual ? if yes can share me location documentation please ?

wag110894 commented 5 years ago

Here is that documentation for select: https://help.form.io/userguide/form-components/#select

AnasHijazi commented 5 years ago

@wag110894 , I know this documention based on this there are field value property it's available on beta web site how can get this property ?

I can't understand comment @travist

I using angular-formio version 3.9.0

AnasHijazi commented 5 years ago

@wag110894 @travist