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

formBuilder based on xml, problem #110

Closed
GarryOne opened this issue Mar 23, 2016 · 6 comments
Closed

formBuilder based on xml, problem #110

GarryOne opened this issue Mar 23, 2016 · 6 comments

Comments

@GarryOne
Copy link
Contributor

If I initialize formBuilder based on following xml, it doesn't work properly

<form-template>
    <fields>
        <field label="Checkbox Group" name="checkbox-group-1458766047820" type="checkbox-group">
            <option value="option-1">some text</option>
            <option value="option-2">another text</option>
            <option value="fsadfdas">some another text</option>
        </field>
    </fields>
</form-template>

It will produce the following result.
http://i.imgur.com/UrJcfFy.png
No matter what

The problem persist on radio buttons too.

The problem appeared in the latest versions.
In the Version: 1.7.5, it's working well.

@kevinchappell
Copy link
Owner

That's quite bad. The difference between those versions is the way form data is saved. I look into this tonight.

@agerson
Copy link

agerson commented Mar 24, 2016

How do you initialize formBuilder based on xml?

@agersoncgps
Copy link

Sorry, just to be clearer, I know how to get the XML of a form I previously built, but I cant find the option for passing that back into $(template).formBuilder(options); to generate the form again.

@kevinchappell
Copy link
Owner

@agersoncgps @agerson
http://codepen.io/kevinchappell/pen/MygvQg
http://codepen.io/kevinchappell/pen/Vedrqr

Working on some documentation for this now.

@GarryOne
Copy link
Contributor Author

<textarea id="form-builder-template" ><?php echo $model->dataXML; ?></textarea>
<script>
$('#form-builder-template').formBuilder();
</script>

I use this code for editing a form.

@GarryOne
Copy link
Contributor Author

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

4 participants