Schedule Form
The Schedule Form component allows users to create or edit a single schedule entry. It provides a form interface with fields for schedule details and handles the creation, updating, and deletion of schedule entries.
Parameters
action
String / Object
Yes
token
String
Authentication token to authorize the component.
Yes
settings
Object
No
arguments
Array
JSON object containing additional arguments for the Schedule Form component.
No
Actions
initialize
Initializes the component.
updateSettings
Updates the component's settings.
Configuration Settings
scheduleId
string
The ID of the schedule to edit. If empty or undefined, a new schedule will be created.
null
Initialize
To load the Schedule Form component in your application, you need to embed the component's iframe in your HTML. The iframe's src
attribute should be set to https://api.recrubo.app/public/v2/embed/component/schedule-form
.
Example
Events
The Schedule Form component triggers events that your application can listen for and handle appropriately.
Schedule Created Event
The scheduleCreated
event is triggered when a new schedule is successfully created. This event provides the ID and title of the newly created schedule.
Schedule Updated Event
The scheduleUpdated
event is triggered when an existing schedule is updated. This event provides the ID and title of the updated schedule.
Schedule Deleted Event
The scheduleDeleted
event is triggered when a schedule is deleted. This event provides the ID of the deleted schedule.
Example of handling the events
All events from the Schedule Form component will include a component
field with the value 'scheduleForm' and an event
field specifying the type of event (e.g., 'scheduleCreated', 'scheduleUpdated', 'scheduleDeleted').
Last updated