User_Register
form contains fields required for registering a new user and sends requests to the user_register_action
URL route.class-{form-name}.php
file (use lowercase letters, numbers, and hyphens only) in the includes/forms
extension subdirectory and HivePress will load it automatically.Foo_Bar
class for the class-foo-bar.php
file). Pick a name that is unique enough to avoid conflicts with other HivePress forms.POST
, GET
);true
to refresh or URL to redirect on success;true
to clear the fields on success;custom_field
name and "Custom field" label. The form's submit button has the "Custom button" label. Once submitted, it sends a request to the custom_action
URL route via the POST
method, displaying the "Custom text" message on success and resetting fields.Model_Form
class to inherit the model fields without repeating them in the form. For example, the code below implements a form based on the Listing
model with the title
and description
fields inherited from it.