Forums

SOLVED IE6 and 7 Form Fields Disappear at Validation

khenn 04 Jan, 2010
I recently downloaded version 3.1 RC5.5 and am using it with Joomla 1.5.15. I normally do all of my development within Firefox. However, when testing my form inside IE, as I begin to type, the validation begins, and I can get 2 to 3 characters typed before the magic happens. In firefox, the border of my text field turns green after I type the first character into a required field. In IE, the text field disappears. Here is the code for one of the text fields.

<div class="form_item">
  <div class="form_element cf_textbox" style="position: absolute; z-index:1; left:10px; top:20px;">
    <label class="cf_label">Health/Accident Insurance Company</label>
    <div style="position: absolute; z-index:2; left: 0px; top:20px;" id="cf_lv_error_insurance">
      <input class="cf_inputbox required" maxlength="150" size="30" title="Insurance Company is required." id="insurance" name="insurance" type="text"/>
    </div>
  </div>
  <div class="cfclear"> </div>
</div>


While using Firebug, I notice that the class for the input tag changes from
class="cf_inputbox required"

to
class="cf_inputbox required LV_valid_field"

when I begin to type.

This happens no matter when I perform the validation, whether it is immediate, onblur, or onsubmit. It's real funny if you do it on submit because then all of your validated form fields disappear from the form.

So how do I fix this? I did search the forum and found a similar post where the person had the label disappearing too. I am putting the textbox in its own div as you can see above.

Thanks,
Kris
khenn 07 Jan, 2010
Anyone have any ideas on this one? I'm getting really close to getting this from ready to go, but I can't do it until I get it working for IE too. I can't even figure out how to debug it because I can't figure out what is changing the class.

Thanks,
Kris
GreyHead 07 Jan, 2010
Hi Kris,

Not sure why the forms disappear - presumably it has something to do with the Border CSS on the form intput. Other than suggesting that you specifically set them rather than using the browser defaults I don't have anything much to offer.

Bob
khenn 08 Jan, 2010
Problem solved.

Notice in the code above, I had the id="cf_lv_error_insurance" on the div tag.

I moved it to the input tag, and that fixed the problem.
This topic is locked and no more replies can be posted.