Jump to content

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

Recommended Posts

Posted

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!

  • Replies 1
  • Views 418
  • Created
  • Last Reply
Posted
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 (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

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.