Jump to content

Adding a code to a button

Recommended Posts

  • Replies 3
  • Views 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

How have you added code to a button? Have you tried adding the code to a code block? Can you share the code for testing?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

I did try and add the code to a code block, I fixed the “” and now this is the photo that pops up, Here is the code:  <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick" /> <input type="hidden" name="hosted_button_id" value="3JD6XEAAKHYWJ" /> <table> <tr> <td> <input type="hidden" name="on0" value="Note any special instructions:"/> Note any special instructions: </td> </tr> <tr> <td> <input type="text" name="os0" maxLength="200" /> </td> </tr> </table> <input type="hidden" name="currency_code" value="USD" /> <input type="image" src="https://cdn.proudground.org/images/site/logo4paypal.png" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Buy Now" /> </form>

Screenshot 2023-10-30 at 3.57.30 PM.png

Edited by aangeles
Link to comment

In the image you show I see smart quotes. HTML does not like smart quotes and they are syntax errors. This usually happens when the code has gone through a word processor.

I suggest using code editor.

The code you pasted into the forum is now smart quote free. The smart quotes have been made dumb. You can copy the code back from here and give it a go. It should look better.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • 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.