Skip to main content

Radio Button in Collection Form

Previously collection form did not support a radio button but now it does. You can either add a radio button by creationg a Static Option field or a Dynamic Option field.


Creating Static Option Radio Field

1. Add New Field

Open the settings of the collection that you will bind to a collection form and click the Add Field button. You will be redirected to a page where you can create different types of field.

DrapCode Builder Binding Collection Form

2. Create a Static or Dynamic Option Field

Select Static Option or Dynamic Option as the field type. Name the field and add options one by one for Static Option field. If you have created a dynamic option field then bind the collection and select the field whose data you want to bring dynamically.

Once done, select the Radio option and click the Save button.

  • Static Option: If you have chosen the Static Option field, name the field first and then manually type options one by one and press enter.
DrapCode Builder Binding Collection Form
  • Dynamic Option: If you have chosen the Dynamic Option field, first name the field and then select the collection and collection field from which you want data to come dynamically from.
DrapCode Builder Binding Collection Form

3. Bind a Collection to a Collection Form

Drop a collection form on a page and bind the collection in which you have added the radio field. Also, bind a Save Collection event to it.

DrapCode Builder Binding Collection Form

4. Publish or Preview

Open the page in the publish or preview mode and you will see the radio field in the collection form.

DrapCode Builder Collection Form