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

Rendering Select not loading the default selected value #288

Closed
kiranmai28mv opened this issue Oct 16, 2016 · 4 comments
Closed

Rendering Select not loading the default selected value #288

kiranmai28mv opened this issue Oct 16, 2016 · 4 comments

Comments

@kiranmai28mv
Copy link

@kiranmai28mv kiranmai28mv commented Oct 16, 2016

Hello Kevin,
Thanks for the plugin.

I am storing the form data to mysql database. The selected option is stored properly in db as follows.



One
Two


but when I render this, the last option value(Two) is getting selected by default. Please help me in fixing the issue, Thanks in advance.

@kiranmai28mv
Copy link
Author

@kiranmai28mv kiranmai28mv commented Oct 16, 2016

the value stored in db is not displayed properly.
<form-template> <fields> <field type="text" subtype="email" required="true" label="Username" placeholder="Enter your username" class="form-control" name="username"></field> <field type="text" required="true" label="Password" subtype="text" placeholder="Enter your password" class="form-control" name="password"></field> <field type="select" required="true" label="Select" placeholder="Select an option" class="form-control" name="persons" values="undefined"> <option label="One" value="one" selected="true">One</option> <option label="Two" value="two" selected="false">Two</option> <option label="Three" value="three" selected="false">Three</option> <option label="Four" value="four" selected="false">Four</option> </field> <field type="button" subtype="submit" label="Login" class="button-input btn btn-default" name="submit" style="default"></field> </fields> </form-template>

@kevinchappell
Copy link
Owner

@kevinchappell kevinchappell commented Oct 16, 2016

What version of formBuilder is this happening in?

@kiranmai28mv
Copy link
Author

@kiranmai28mv kiranmai28mv commented Oct 16, 2016

Version: 1.23.0

@kiranmai28mv
Copy link
Author

@kiranmai28mv kiranmai28mv commented Oct 16, 2016

I am facing the same issue for checkbox group and radio buttons also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.