You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The form class extends {@link RequestHandler}, which means it can be accessed directly through a URL. This can be handy for refreshing a form by ajax, or even just displaying a single form field. You can find out the base URL for your form by looking at the <form action="..."> value. For example, the edit form in the CMS would be located at "admin/EditForm". This URL will render the form without its surrounding template when called through GET instead of POST.
By appending to this URL, you can render individual form elements through the {@link FormField->FieldHolder()} method. For example, the "URLSegment" field in a standard CMS form would be accessible through "admin/EditForm/field/URLSegment/FieldHolder".
After testing on multiple forms, including the admin/EditForm example, this doesn't actually work and returns This form requires a POST submission instead of the rendered HTML of the form.
Steps to Reproduce
Append the form name to the end of the URL of the page the form is located on. ie:
mysite/admin/EditForm
mysite/contact/ContactForm
Is there a proper way to do this? Or is this just outdated documentation?
The text was updated successfully, but these errors were encountered:
Affected Version
Tested in 4.3, but could affect older versions.
Description
The documentation for the Form class (https://api.silverstripe.org/4/SilverStripe/Forms/Form.html) says:
After testing on multiple forms, including the admin/EditForm example, this doesn't actually work and returns This form requires a POST submission instead of the rendered HTML of the form.
Steps to Reproduce
Append the form name to the end of the URL of the page the form is located on. ie:
mysite/admin/EditForm
mysite/contact/ContactForm
Is there a proper way to do this? Or is this just outdated documentation?
The text was updated successfully, but these errors were encountered: