Jump to content

Changing text in form - "required" label

Recommended Posts

Hi, everybody!

I am searching for some help with my current issue. I am trying to change the "required" text (label) in forms to either Czech or at least an asterisk. Besides that, I would also need to change the validation message (the one that appears when a required field has not been filled in). Pictures attached.

I understood, that the text appears automatically based on the preselected language of the site. My language - Czech - is unfortunately not an option to be selected. So I need to solve this via custom code. 

I tried several options (Java Code Injection and CSS), but none of them had any effect at all. 

One of the snippets I tried:

/* Hide the default "(required)" text */
.sqs-block-form .form-field .required {
    display: none;
}

/* Add custom text or an asterisk to the label of required fields */
.sqs-block-form .form-field .field-label::after {
    content: ' * požadováno'; /* Customize this text to your desired language */
    color: red; /* Customize the color if needed */
    font-size: 1em; /* Customize the size if needed */
    margin-left: 5px; /* Adjust spacing if needed */
}
 

Any ideas about what the solution could be? Thank you soo much in advance!
 

 

required 2.jpg

required.jpg

Link to comment
19 minutes ago, KaterinaSoria said:

I am trying to change the "required" text (label) in forms to either Czech or at least an asterisk.

Please see my earlier answer about this here: WHY does my form now say "required" and not the asterisk?

Did this help? Please give feedback by clicking an icon below  ⬇️

 

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Would you like your customers to be able to mark their favourite products in your Squarespace store?

Link to comment
26 minutes ago, paul2009 said:

Please see my earlier answer about this here: WHY does my form now say "required" and not the asterisk?

Did this help? Please give feedback by clicking an icon below  ⬇️

 

Thank you so much! It definitely helped to solve the "asterisk" problem. I was working on this for the whole day! I am soo thankful! 

There is still the problem with the validation messages, though. I'll try to keep searching for solutions 😊 

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.