Jump to content

Grabbing content from one spot on my page, and inserting it in another via code block

Recommended Posts

Site URL: https://elevatecharter.com/contract-payment-test-1

Hello!

New to coding, but I think the following request should be fairly straightforward for the experts!

Q: How do I write a line of html that would grab content from my page's text box, and then automatically display the same content (same formatting and all)  in another spot on my page?

I would be inserted the copied text into a 3d party integration like JotForm using a code block but it could just as easily be a Squarespace code block. The idea being that I want to create/edit the content once in Squarespace using a text block, and then have it automatically display elsewhere without having to manually copy it and insert it each time I modify it.

Thanks so much!

Link to comment
  • Replies 1
  • Views 382
  • Created
  • Last Reply
On 3/21/2021 at 7:33 PM, RobR said:

Site URL: https://elevatecharter.com/contract-payment-test-1

Hello!

New to coding, but I think the following request should be fairly straightforward for the experts!

Q: How do I write a line of html that would grab content from my page's text box, and then automatically display the same content (same formatting and all)  in another spot on my page?

I would be inserted the copied text into a 3d party integration like JotForm using a code block but it could just as easily be a Squarespace code block. The idea being that I want to create/edit the content once in Squarespace using a text block, and then have it automatically display elsewhere without having to manually copy it and insert it each time I modify it.

Thanks so much!

You can access other page content using ajax call and extract the content you wanted (the text value in this case) and parse it around, this would require advance plan to enable javascript as custom injection

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

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.