Jump to content

Global custom fields

Recommended Posts

I am looking for a way to add user-friendly fields into some global location on the site's backend dashboard, and the ability to (1) reference that field data in pages, similar to how WordPress uses shortcodes (e.g. [admins-favorite-color]), and (2) be able to pull from and even loop through that data whether in my injected JavaScript code or in the template files via FTP. Normally, something like this would be possible on the server-side using a language like PHP or Node.js.

Quick backstory/context— this is a feature I use frequently in my non-Squarespace programming, whether it be gas prices for a gas station website that a manager edits as the prices fluctuate or for church service times that the pastor can adjust as they change. In both example cases, my JavaScript reads the fields and their values and then executes code conditionally based on user input.

Fields can be of different types, such as select, textarea, single-line input, checkboxes, radio buttons, sections, tabs, buttons, etc. The WordPress equivalent of this is the highly popular 3rd-party plugin, Advanced Custom Fields which offers free and "Pro" feature/pricing tiers.

If this isn't currently possible out-of-the-box, I imagine a feature like this would be highly desired and would open the door to plenty of custom development that doesn't appear to be possible with Squarespace at the moment. In the meantime, what would be alternatives be to implement something like this? Would I have to build my own API/plugin hosted somewhere else along with a separate CMS for user's to edit the field values and then pull those scripts and that data via some AJAX call in JavaScript? I'm hoping there's a simpler—more native—solution, as the alternative seems awfully overkill.

Thanks!

Link to comment
  • Replies 0
  • Views 638
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.