v2-docs icon indicating copy to clipboard operation
v2-docs copied to clipboard

Form field but no documentation

Open kobadg opened this issue 8 years ago • 6 comments

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

kobadg avatar Feb 21 '17 18:02 kobadg

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

jackmcdade avatar Feb 21 '17 19:02 jackmcdade

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 avatar Feb 23 '17 14:02 kobadg

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 avatar Feb 23 '17 14:02 jasonvarga

@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.

seanhudson avatar Aug 17 '17 22:08 seanhudson

There is still no documentation on this

redolivedev avatar Mar 23 '19 22:03 redolivedev

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.

Christophvh avatar Nov 15 '19 09:11 Christophvh