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

Comments

Projects
None yet
2 participants
@kiranmai28mv

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

This comment has been minimized.

Show comment
Hide comment
@kiranmai28mv

kiranmai28mv 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>

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

This comment has been minimized.

Show comment
Hide comment
@kevinchappell

kevinchappell Oct 16, 2016

Owner

What version of formBuilder is this happening in?

Owner

kevinchappell commented Oct 16, 2016

What version of formBuilder is this happening in?

@kiranmai28mv

This comment has been minimized.

Show comment
Hide comment
@kiranmai28mv

kiranmai28mv Oct 16, 2016

Version: 1.23.0

Version: 1.23.0

@kiranmai28mv

This comment has been minimized.

Show comment
Hide comment
@kiranmai28mv

kiranmai28mv Oct 16, 2016

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

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