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

Form field but no documentation #187

Open
kobadg opened this issue Feb 21, 2017 · 6 comments
Open

Form field but no documentation #187

kobadg opened this issue Feb 21, 2017 · 6 comments

Comments

@kobadg
Copy link

kobadg commented Feb 21, 2017

I went to use the form fieldset, however I cannot find out how, as there is no documentation.

@jackmcdade
Copy link
Member

Did you check out https://docs.statamic.com/forms#create ?

@kobadg
Copy link
Author

kobadg commented Feb 23, 2017

Yes, however that doesn't explain the use of the fieldtype* named form. Gives a dropdown of all the forms in the formset?

Asked Jason about it, stated that it ideally will print the name of the form, he stated yes.

{{ if formName == "contact" }} being a scenario it would work for. Or something along that lines.

@kobadg kobadg closed this as completed Feb 23, 2017
@jasonvarga
Copy link
Member

You can leave this open, since we need to add documentation to https://docs.statamic.com/fieldtypes/form

To clear things up, this is about the Form Fieldtype (added in 2.1.15), which essentially lets you choose one or more forms.

the_form:
  type: form
  max_items: 1 # setting to 1 will treat this as a dropdown and save a string instead of an array

Then you could do something like:

{{ form:create :in="the_form" }} ... {{ /form:create }}

@jasonvarga jasonvarga reopened this Feb 23, 2017
@seanhudson
Copy link

@jasonvarga do you have an example that I can use to see how this would work? I'm wanting to use the Form Fieldtype. Thanks.

@redolivedev
Copy link

There is still no documentation on this

@Christophvh
Copy link

Please add this somewhere in the docs:
max_items: 1 # setting to 1 will treat this as a dropdown and save a string instead of an array

I spend hours searching for a way to select a single item.

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

6 participants