orchidhq / Orchid

Build and deploy beautiful documentation sites that grow with you
https://orchid.run
GNU General Public License v3.0
513 stars 53 forks source link

Orchid Forms examples #327

Closed singularsyntax closed 4 years ago

singularsyntax commented 4 years ago

Hello,

Are there any examples of Orchid Forms in use? I'm trying to setup a form, but I'm not seeing the __onSubmit hidden field with return redirect URL when I submit the form.

Thanks.

cjbrooks12 commented 4 years ago

It looks like the docs are a bit out of date, sorry about that. The condition for __onSubmit should be added when a redirectionPage is specified on the form definition, not when the action is missing.

The redirectionPage is a PageRelation, so can just be a page title, or can be an object with itemId, collectionType, or collectionType attributes.

Try a form definition like the following:

title: 'Contact Us'
redirectionPage: 'Thank You'
fields:
  ...
singularsyntax commented 4 years ago

That worked. Thanks.