Fundraising/Internal-facing/CiviCRM/Exporting FormBuilder Pages into an extension
Appearance
Like the SearchKit Search export, this would also be helpful if the extension by which the FormBuilder page is built on was designed to be reusable. The following steps would describe how to ensure a FormBuilder page is packaged into a custom extension.
- Having completed the designing of the FormBuilder page.
- On the FormBuilder home page, locate the row that corresponds to your FormBuilder page and take note of the designated name in the name column.
- On the computer file system, navigate to this directory: drupal/sites/default/files/civicrm/ang. This directory is where the Afform templates are initially stored whenever the FormBuilder page is designed.
- To make this FormBuilder page available wherever the extension is installed, the files corresponding to the desired FormBuilder page would have to be moved to the extension directory.
- Search for files corresponding to the name of the FormBuilder page (from Step 2). Assuming the name of the FormBuilder page is afsearchTest, the required files to copy in the directory would be afsearchTest.aff.html and afsearchTest.aff.json.
- Copy these files.
- On the extension direction in the file system, create a new directory titled "ang".
- Paste this new files into the "ang" directory created in Step 7.
- Now the FormBuilder page would always be available wherever the extension is installed.