Jump to content

Custom CSS for Form captions no longer working

Recommended Posts

I have had Custom CSS changing the words on my Form's captions/headings for several months without issues. Now, the custom CSS code no longer seems to work. 

Here's what I currently have in my Custom CSS:

/* First name */
.field.first-name span.caption-text {
    visibility: hidden;
}
.field.first-name span.caption-text:before {
    visibility: visible;
    content: "First Name*";
}
/* last name */
.field.last-name span.caption-text {
    visibility: hidden;
}
.field.last-name span.caption-text:before {
    visibility: visible;
    content: "Zip Code*" !important;
}

I've even tried inserting/injecting it into the Header and Footer without help. Thanks in advance for your help

Link to comment
  • Replies 6
  • Views 1.5k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

On 9/26/2023 at 7:26 PM, trutinel said:

https://calliope-beige-fae5.squarespace.com

 

Thanks in advance for your help!

You can use this CSS code

.field.first-name .caption-text:after {
    content: 'Primeiro nome';
    font-size: 15px;
}
.field.last-name .caption-text:after {
    content: 'Sobrenome';
    font-size: 15px;
}
.caption-text, .sqs-block-form .field-list .description, .email .xHXC4uuk1CR_E981Erer {
    font-size: 0px !important;
}
span.description.required:after {
    content: '(obrigatória)';
    font-size: 15px !important;
    font: inherit;
}
.email .xHXC4uuk1CR_E981Erer:before {
    content: 'E-mail';
    font-size: 15px !important;
    font: inherit;
    padding-right: 1ex
}
form.react-form-contents > div .field-list p:after {
    content: 'Falha no envio do formulário. Revise as seguintes informações: Nome, Email, Telemóvel e Mensagem.';
    font-size: 14px !important;
    font: inherit;
    line-height: 21px
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 9/30/2023 at 7:34 PM, tuanphan said:

You can use this CSS code

.field.first-name .caption-text:after {
    content: 'Primeiro nome';
    font-size: 15px;
}
.field.last-name .caption-text:after {
    content: 'Sobrenome';
    font-size: 15px;
}
.caption-text, .sqs-block-form .field-list .description, .email .xHXC4uuk1CR_E981Erer {
    font-size: 0px !important;
}
span.description.required:after {
    content: '(obrigatória)';
    font-size: 15px !important;
    font: inherit;
}
.email .xHXC4uuk1CR_E981Erer:before {
    content: 'E-mail';
    font-size: 15px !important;
    font: inherit;
    padding-right: 1ex
}
form.react-form-contents > div .field-list p:after {
    content: 'Falha no envio do formulário. Revise as seguintes informações: Nome, Email, Telemóvel e Mensagem.';
    font-size: 14px !important;
    font: inherit;
    line-height: 21px
}

 

How do I replace the words "Last Name" instead of just adding words after those words?

Link to comment
On 10/6/2023 at 7:06 PM, trutinel said:

How do I replace the words "Last Name" instead of just adding words after those words?

Use this

.field.first-name .caption-text, .field.last-name .caption-text {
    visibility: hidden;
}
.field.first-name .caption-text:before, .field.last-name .caption-text:before {
    visibility: visible;
}
.field.first-name .caption-text:before {
    content: 'Primeiro nome';
    font-size: 15px;
}
.field.last-name .caption-text:before {
    content: 'Sobrenome';
    font-size: 15px;
}

image.png.0005fc0ee1dd29a8e60c2fba82e59bcd.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.