I copied it straight from the demo with just  a couple minor changes...

going to remove the code that I don't need once I work this out...

    $(document).ready(function(){
        $.validator.messages.required = "";
        $("#lf").bind("invalid-form.validate", function(e, validator) {
                var errors = validator.numberOfInvalids();
                if (errors) {
                        var message = "Please complete the form:";
                        $("#formheader").html(message);
                        $("#formheader").show();
                }
        }).validate({
                //focusInvalid: false,
                //focusCleanup: true,
                onkeyup: false,
                submitHandler: function() {
                        $("div.error").hide();
alert("submit! use link below to go to the other step");
                },
                messages: {
                        password2: {
                                required: " ",
equalTo: "Please enter the same password as above"
                        },
                        email: {
                                required: " ",
email: "Please enter a valid email address, example: y...@yourdomain.com", remote: jQuery.format("{0} is already taken, please enter a different address.")
                        }
                },
                debug:true
        });

  });

relevent bit of html:

<form id="lf" name="lf" method="post" action="/lp2op" style="display:inline">
        <div class="form_bod">
<div id="formheader" class="formtitle">Please ship my <strong>FREE</strong> 7 day Trial plus Colgate kit</div> <div class="formlabel"><label for="fname">First Name:</ label></div> <input maxlength="75" name="fname" id="fname" size="19" class="text required" value="" /> <div class="formlabel"><label for="lname">Last Name:</ label></div> <input maxlength="75" name="lname" id="lname" size="19" class="text required" value="" /> <div class="formlabel"><label for="address1">Address:</ label></div> <input maxlength="30" name="address1" id="address1" size="19" class="text required" value="" /> <div class="formlabel"><label for="address2">Address 2:</ label></div> <input maxlength="30" name="address2" id="address2" size="19" class="text" value="" /> <div class="formlabel"><label for="city">City:</label></ div> <input maxlength="75" name="city" id="city" size="19" class="text required" value="" /> <div class="formlabel"><label for="state">State:</label></ div> <select size="1" name="state" id="state" class="stateselector required">
... state list snipped...
            </select>
<div class="formlabel"><label for="zipcode">Zip:</label></ div> <input maxlength="5" name="zipcode" id="zipcode" size="15" value="" class="text required" /> <div class="formlabel"><label for="phone">Phone:</label></ div> <input maxlength="30" name="phone" id="phone" size="19" class="text required" value="" /> <div class="formlabel"><label for="email">Email:</label></ div> <input maxlength="75" name="email" id="email" size="19" class="text required email" value="" /> <input id="submit_btn1" name="submit_btn" type="image" src="[% image.src( '/lp-cxdigital/images/button1.gif' ) %]" class="button1" alt="GET IT NOW" />
        </div>
</form>

On Dec 13, 2008, at 12:32 PM, Jörn Zaefferer wrote:

No idea, I'd need to see some code, a testpage is prefered.

Jörn

On Sat, Dec 13, 2008 at 4:03 PM, Sean Allen <s...@monkeysnatchbanana.com > wrote:

I already have that in place.

How do I get the autogenerated label to not do style="display:inline" ? In that demo there is no such element styling on the label created for
errors.


On Dec 12, 2008, at 4:37 PM, Jörn Zaefferer wrote:

In that demo this line hides the default messages for the required method:

$.validator.messages.required = "";

Jörn

On Fri, Dec 12, 2008 at 9:17 PM, Sean Allen <s...@monkeysnatchbanana.com >
wrote:

playing around with it.

don't want to get error messages displayed.

i'm just putting in a general error message at top and highlighting
required fields.
but the label for errors gets created with a display: inline set on
the element which is
thwarting me from not showing it.

looking at the marketo example ( for 2 hours now ), i see no such
display: inline being set
but can't figure out why that is.

can anyone explain?





Reply via email to