FieldtypeFormSelect by FireWire

Select a form created via the Pro Form Builder module

Fieldtype Form Select

A ProcessWire Fieldtype for creating fields where a form built using Form Builder can be chosen via a select element.

Requirements


  • ProcessWire >= 3.0
  • FormBuilder
  • PHP >= 8.1

This module was developed using FormBuilder 0.5.5 and ProcessWire 3.0.235, however it should be compatible with other versions.

How To Use


Install in ProcessWire as a module from the ProcessWire directory.

Or install with composer using composer require firewire/fieldtype-form-select.

Ensure that FormBuilder is installed, then install this module. Create some forms. Create a Form Select field and then specify which forms you would like to appear in the field under the "Details" tab. The options to select which forms will appear in the select field are as follows:

  • All forms (default)
  • Include only forms you choose
  • Include all forms except those you choose to exclude
  • Include forms where the name starts with a specified string
  • Include forms where the name ends with a specified string
  • Include forms where the name contains a specified string

You may choose how the field outputs values both when a form is or isn't selected.

Optionally, choose how the form names will appear in the select element when rendered. Options include:

  • Default name: my-form-name
  • Lowercase and spaced: my form name
  • Capitalized and spaced: My Form Name
  • First letter capitalized and spaced: My form name

This field stores the ID of the for that is selected, or null otherwise.

If a form is deleted, all Form Select fields containing a reference/ID to that form will have their value cleared and set to null.

Nifty Tricks


Form Select provides another way to render your form. To render the markup for a form that was selected, call $page->render('your_form_select_field'), and voila- your form is rendered to the page.

This module is compatible with FormBuilderHtmx which adds AJAX submission abilities to forms built with FormBuilder.

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #560
    In the 560th issue of ProcessWire Weekly we'll check out the latest core updates, cover newly released ProcessWire modules, and more. Read on!
    Weekly.pw / 1 February 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

“We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like superbude.de. ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH