-
Posts
99 -
Joined
-
Last visited
Personal Information
Recent Profile Visitors
935 profile views
Inscape's Achievements
-
tuanphan reacted to a post in a topic: Automatically display text when summary block is empty
-
Automatically display text when summary block is empty
Inscape replied to alicroft's topic in Customize with code
If you have more than one Summary Block, you can target the specific one you want to display the message by using its block id as shown below (where it says 'block-numbersandletters'): <div id="no-events"></div> <script> window.addEventListener('DOMContentLoaded', (event) => { var summaryExists = document.getElementById('block-99b2e1d5ac7d9ed116cd').getElementsByClassName("summary-title")[0]; if (summaryExists == null) { document.getElementById('no-events').innerHTML = "There are no upcoming events at this time. Check back soon!"; } }); </script> To find the block id, use the "Squarespace ID Finder" Chrome Extension or use your Chrome inspection tool to find the id for the summary block.- 37 replies
-
- summary-block
- events
-
(and 3 more)
Tagged with:
-
Inscape reacted to a post in a topic: Hide/Show Content Description Text
-
Inscape reacted to a post in a topic: Logo/Header Shrink on Scroll
-
Inscape reacted to a post in a topic: Gallery Grid with Overlay Captions on Hover - link not working?
-
Thanks for the update, @dianeceramics. I never did test this on a 7.1 site, so could be it only works on 7.0.
-
Thanks for all your help with this @creedon.
- 29 replies
-
- code
- code-injection
-
(and 2 more)
Tagged with:
-
Ok, I'm trying to populate Squarespace form fields with the inputs from a calculator form in a code block: https://cobalt-contrabass-xw72.squarespace.com/booking-1 (password: bins123) But as mentioned in this thread, the inputs are clearing as soon as the user starts adding info to the Squarespace form. I'm trying to add the input number from #bins to #text-56a5bb5a-2474-4539-b9d6-6144dfcb83b9-field and the selected radio from input[name="plan"] to #text-f8c41f2d-6eba-473a-8828-aa3c04a210fb-field. Here's the code that's not working because the programmatic input keeps getting wiped: $('#bins').on('change', function() { $('#text-f8c41f2d-6eba-473a-8828-aa3c04a210fb-field').val($(this).val()); }); $('input[name="plan"]').on('change', function() { $('#text-56a5bb5a-2474-4539-b9d6-6144dfcb83b9-field').val($(this).val()); }); I can't figure out how to translate what I have here into what @creedon shared. Can anyone help me?? I was also trying to prefill the fields when the page loaded in case the user doesn't change the radio or number inputs. In the code below, the value is getting wiped when the form is used (I guess because of React). This is less of a priority than the above if anyone could be so kind as to help me!! window.onload = function() { document.getElementById('text-56a5bb5a-2474-4539-b9d6-6144dfcb83b9-field').value = 'Biweekly'; document.getElementById('text-f8c41f2d-6eba-473a-8828-aa3c04a210fb-field').value = '1'; }; Seems like it was so simple and now it's over my head. 😞
- 29 replies
-
- code
- code-injection
-
(and 2 more)
Tagged with:
-
Translate Auto-Inserted Form Field Labels in Contact Form
Inscape replied to HeyItsPrescott's topic in Customize with code
That's great @Greg_pns! Looks like the same principle as my solution (using CSS pseudo-elements), with the ability to automatically detect whether the page is French. In my solution, I had previously added a class to all French pages which allowed me to target them in Custom CSS.- 8 replies
-
- javascript
- form
-
(and 2 more)
Tagged with:
-
Translate Auto-Inserted Form Field Labels in Contact Form
Inscape replied to HeyItsPrescott's topic in Customize with code
@Greg_pns and @HeyItsPrescott, I ended up solving this by using a CSS pseudo-element instead of a script. In custom CSS, added: .field.first-name .caption-text {visibility:hidden} .field.first-name .caption-text::before {content:"Prénom"; display:inline-block !important; visibility:visible !important;} .field.last-name .caption-text {visibility:hidden} .field.last-name .caption-text::before {content:"Nom de famille"; display:inline-block !important; visibility:visible !important;} .description.required {visibility:hidden} .description.required::before {content:"(requis)"; display:inline-block; visibility:visible} Hope this helps!- 8 replies
-
- javascript
- form
-
(and 2 more)
Tagged with:
-
Translate Auto-Inserted Form Field Labels in Contact Form
Inscape replied to HeyItsPrescott's topic in Customize with code
@paul2009 I'm experiencing what Greg mentioned as well. No matter where and how I add this code, or any script attempting to translate these fields (specifically First Name and Last Name), it doesn't work. I've tried several solutions including yours, and read all your information about the updated classes; still no go. Page I'm working on is here: https://lavender-disc-ta5j.squarespace.com/fr/contact-us- 8 replies
-
- javascript
- form
-
(and 2 more)
Tagged with:
-
Hi, not sure if you ever solved this. I just came up with a solution for a client that works perfectly. If you add a video block in the Additonal Info section, this code pops the video above your image gallery. You need to add it to your sitewide Code Injection, in the Header Code area: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script> <script> $(document).ready(function(){ $(".sqs-block-video").insertBefore('.ProductItem-gallery-slides'); }); </script> You can see the result live here: https://ademiboutique.squarespace.com/shop/paris. This is a 7.0 Brine site but as far as I can tell should work the same on 7.1. I can only vouch for it working with a single video block in the Additional Info section. Hope this helps though it was a while ago you asked the question!
-
Tablet view with Fluid Engine
Inscape replied to Martian's topic in Getting Started With Squarespace
Will Myers just posted a solution to the tablet spacing problem! He is offering it for free! https://www.will-myers.com/articles/fixing-the-tablet-spacing-problem-in-squarespace-fluid-engine -
When I reported it to Squarespace, their response suggested they do not consider it a bug. They said they would relay my feedback to the design team, but they didn't use the typical language I have seen from them in the past when acknowledging bugs and saying they are working on a fix. They didn't fix it in advance because they didn't see it as a problem. Therefore, everyone reading this post who thinks it is a problem should submit a support ticket! If they don't know we hate it, they will never fix it!
-
The same thing happens with text block with a background when next to an expanded accordion, which looks even worse: I've reported to Squarespace but please post here if anyone has found a solution for this!
-
How can I get my carousel-summary blocks to line up?
Inscape replied to jessierotton's topic in Customize with code
Another similar option would be to set min-height for .summary-content. This works if you have a bunch of metadata that could also go onto multiple lines. Example: .summary-content {min-height:100px} -
Ugh, responding to my own question... just realized that (assuming everything else I mentioned could be accomplished) once you've shared the sign up link with approved members, they could "illegally" share it with unapproved parties, so this is not a complete solution either. Thwarted. Really just need an option to require member approval before granting access.
-
Hi all, joining this conversation as a client has asked to be able to vet Members for approval before they have access to her content; she is trying to protect artwork from pirates. I'm just wondering if custom code works on Member areas lock screens/sign up screens since I've never tried this before. For example, could you use JS to replace the "Join" buttons/links so that they redirect to a contact form? Then, once you approve a member, they can actually join only if you send them a direct link (because you've redirected all other instances of that link showing up on the site)? I've done this for clients on Circle.so, which is why I wondered if it would work here... but not clear from what's been said whether you can use custom code in member areas, and I've never tried!