Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to show hidden fields #19

Closed
prajayan76 opened this issue Sep 15, 2018 · 1 comment
Closed

how to show hidden fields #19

prajayan76 opened this issue Sep 15, 2018 · 1 comment

Comments

@prajayan76
Copy link

prajayan76 commented Sep 15, 2018

var fieldsHidden = true
...
...
...

onValueChange(){
const formValues = this.formGenerator.getValues();
formValues.selectname['id'] !== '1' ? fieldsHidden = false : fieldsHidden = true
}

const fields = [

{
type: 'select',
name: 'Organization',
multiple: false,
required: true,
label: 'OrganizationType',
labelKey: 'name',
primaryKey: 'id',
objectType: true,
options: [ // required
{
id: 1,
name: 'Health',

  },
  {
    id: 2,
    name: 'Finance',

  }

],
defaultValue: [{
    id: 1,
    name: 'Health',
  }],

},

{
type: 'text',
name: CompanyName',
label: 'Company Name',
hidden: fieldsHidden,
},
]

its not working

@luissmg
Copy link
Contributor

luissmg commented Nov 8, 2018

You can't right now. The lib does not update the fields. I will do a PR for this once the owner of the project @bietkul answers my email.

bietkul added a commit that referenced this issue Nov 21, 2018
Add possibility to update Form fields (hidden, options, ...). Fixes #19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants