v1.0
Form
Form prefab is native html form tag that connects all prefabs together into a form.
Create and connect your own custom prefab inputs into a single form.
Sends a custom event on submission allowing for other use cases.
Can send to FormSpark, FormSpree or a custom Endpoint.
Create a framer component: Using framer create a component that will use this prefab.
Add prefab: Add the prefab to the component and connect the transitions to the matching variants states.
Nest prefab: Nest the prefab to the parent frame.
Add any prefab controls: You can now build your form by adding and associating prefabs you have made by matching the form id set in the form prefab.
Test: Test the component in preview and ensure that your transitions are working and if your end point successfully sends the information.
Done: That is it! You are all set to use this prefab.
When creating the component that will be used with this prefab consider the following:
When creating a form consider clear and concise feedback. If you have any validation consider adding a text or label to help the user verify on how to correct.
All inputs within a form should have a pairing label. Avoid using vague inputs.
If you are making a form component be sure to set the tabIndex=-1
as framer auto sets all components to 0 creating unnecessary focus when navigating via keyboard.
Property
Description
ID
The value that will populate the html id attribute.
Service
Send to any FormSpark, FormSpree, Custom end point.
Action
Url endpoint to send the POST request.
Rest After
The form will reset automatically to the default variant after a submission is made.
Timeout
Resets the form after X amount of seconds.
Events
Supported events: Default, Sending, Success, Error