Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Currently having an issue where the values from input fields are popping up on my web page, and I can't seem to find what might be putting them there.

The below code snippet is the (clumsy) way that I'm allowing someone to set either a colour value or image as the background on a web page.

    - background_type allows the user to select what kind of background they want (colour or image)
    - background_image lets them upload the image
    - background_col lets them enter a colour value
    - the background_type is set to a variable
    - If statement will create a div with the relevant background information depending on what the user selected as the background_type

Everything functions fine but I get this text appearing in the top-left side of my screen:


This text is values that have been dropped in on the cms side. 'hex' is one of the option values, and 'white' is the colour that was input. If I select "Image" and drop in an image, it displays "img" and the url. Does anyone know why this might be happening?

Code: Select all
<cms:editable name='background_cust' label='Background Customisation' desc='Set the background of the page' type='group' />

  label="Background Type"
  desc="Which type of background would you like to use?"
  opt_values="Colour (HEX)=hex | Background Image (URL)=img"

  label="Background Image"
  desc="Upload/Selct an image to use"

  label="Background Colour (Hex)"
  desc="Enter a colour code to use"

<cms:set bgtype="<cms:get 'background_type' />" />

<cms:if bgtype = 'hex'>
  <div id="bg" data-bg="<cms:get 'background_col'/>"></div>

<cms:if bgtype = 'img'>
  <div id="bg" data-bg="url('<cms:get 'background_image'/>') 50% 50% /cover no-repeat"></div>
2 posts Page 1 of 1

Who is online

In total there are 7 users online :: 1 registered, 0 hidden and 6 guests
(based on users active over the past 5 minutes)

Users browsing this forum: Google [Bot] and 6 guests