Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8326097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:39:22+00:00 2026-06-09T00:39:22+00:00

I am using a CMS that allows data place holders with braces, like so:

  • 0

I am using a CMS that allows data place holders with braces, like so:

Name: {First_Name} <br> 
Email: {Email} <br> 
Phone: {Phone} <br> 

However it doesn’t give me any way to do conditional output, like I can’t hide the Phone line if the phone field is blank.

The CMS doesn’t allow javascript or server side code. I came up with this trick:

Name: {First_Name} <br> 
Email: {Email} <br>
<div style="display:none{Phone}">Phone: {Phone} <br></div> 

If the person has no phone number, the div ends up display:none, but if they do, the div ends up with a nonsense value for display, and the whole div shows up.

It works in IE8, IE9, FF14, Chrome

Any reason I shouldn’t do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T00:39:23+00:00Added an answer on June 9, 2026 at 12:39 am

    No, that’s absolutely fine; a value that’s not understood by the browser, in CSS, doesn’t result in an error, it simply ignores that value and displays the element with its default setting for that property.

    [For] illegal values. User agents must ignore a declaration with an illegal value. For example:

    img { float: left }       /* correct CSS 2.1 */
    img { float: left here }  /* "here" is not a value of 'float' */
    img { background: "red" } /* keywords cannot be quoted */
    img { border-width: 3 }   /* a unit must be specified for length values */
    

    A CSS 2.1 parser would honor the first rule and ignore the rest, as if the style sheet had been:

    img { float: left }
    img { }
    img { }
    img { }
    

    Citation: http://www.w3.org/TR/CSS21/syndata.html#parsing-errors

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a CMS that doesn't let me edit the HTML, I can only
I have a CMS application written using the Zend Framework that allows you to
I'm trying to design a CMS-like system that allows a user to modify HTML
I'm using Symphony CMS which as default has a mod_rewrite that rewrites all directories.
I am using Spring 3, JPA + Hibernate for a CMS application. In that
We have a CMS that supports multiple sites, one of our features allows our
I'm part of a development team that works on many CMS based projects, using
I am in the middle of setting up a basic CMS that allows the
I am using phpTumblr, a wrapper around the tumblr blog api that allows you
I'm currently building a site that allows previewing photos and videos using Shadowbox. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.