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 make a dropdown from form.json #41

Closed
AndrewMerke opened this issue Aug 27, 2018 · 8 comments
Closed

How to make a dropdown from form.json #41

AndrewMerke opened this issue Aug 27, 2018 · 8 comments
Assignees

Comments

@AndrewMerke
Copy link

Hello I am trying to learn about React-Redux authentications with JWT and yours examples works perfectly for me. But I have one question, how to make a dropbox with different value from yours form.json file. For example I want to add country to register formType. How to make dropdown of every country and make dropdown of them?

@soupette
Copy link
Contributor

Well the idea of this file is to map an input with a type.
So you'll need to create a DropDownInput and add it to the InputsIndex, with the needed data.
Then it should works

@soupette soupette self-assigned this Aug 27, 2018
@AndrewMerke
Copy link
Author

AndrewMerke commented Aug 28, 2018

But lets say I want Input and DropDownInput in random order, maybe you could suggest me how to achieve this? And I want to have all fields in one form.json

@soupette
Copy link
Contributor

What do you mean by random order? One time your input comes before the dropdown the other after?

@AndrewMerke
Copy link
Author

Yes, something like that

@soupette
Copy link
Contributor

You just need a shuffle algorithm then

@AndrewMerke
Copy link
Author

AndrewMerke commented Aug 28, 2018

Maybe you have an example in your directory with this?

@soupette
Copy link
Contributor

I can provide some pseudo-code if you want.
If I do understand it well you want to

  • select a country => display a new input to select for example the state and so one?

@AndrewMerke
Copy link
Author

Lets say, I have a form.json of 5 fields, 2 of them are dropdowns

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