Skip to content

Latest commit

 

History

History

Form Block Fields From Search Parameters

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Form Block Fields From Search Parameters

Synopsis

Fill form fields from search query parameters of the page URL.

Version 0.2.0

SS Versions

  • 7.1

  • 7.0

Dependencies

v7.1 Fluid Engine Compatible

  • Yes

Install

  • Install Form Block Wrapper Observe Changes. After you install the code be sure to continue on with the rest of the steps.

  • Options

  • Add or edit a form block.

  • In the Form Block Wrapper Observe Changes code add twcFbffsp to added per the Form Block Wrapper Observe Changes code install steps.

  • For each form field that you want to map from a search query string parameter key and put the parameter value into the field, add a line of the following format to DESCRIPTION.

    twc-fbffsp : text
    

    text is the search query string parameter key and would look like the following in a URL.

    http://your-site.squarespace.com?text=your+text+here
    

    For a compound field like Address add a line of the following format.

    twc-fbffsp : first=First Name, last=Last Name
    

    first and last are the search query string parameter keys and would look like the following in a URL.

    http://your-site.squarespace.com?first=John&last=Doe
    

Notes

This effect is not active in Squarespace Preview to test it use private browsing.

This effect does not work with checkbox, radio, or survey fields.

Demo

You can see a demo of this effect here.

Make a Donation

Please consider making a donation.

Changes

  • 2024-04-28

    • remove line field to trigger effect, adding the callback is the trigger
    • bumped version to 0.2.0
  • 2024-04-27

    • update to work with Form Block Wrapper Observe Changes v0.3.0
    • bumped version to 0.1.1
  • 2022-07-28

    • initial version