2008/8/29 Daniel Nicoletti <[EMAIL PROTECTED]>: > Hi, > i don't know if here i where i can ask questions about how to use > but anyway. > I want to do a password match, i googled but could not find > anything related to formfu. > so i did > $form->param_value('pass1') == $form->param_value('pass2') > then i would like to add an error if the form is submitted > but has different pass but i don't know how.
Use Constraint::Equal - for example: elements: - type: Password name: pass1 - type: Password name: pass2 constraints: - type: Equal others: pass1 > a second issue is about using label_for, > is there some option to enable this? > i really like label_for i can try to hack > if this isn't implemented but i need directions. If you give a field an 'id' and a 'label' - it'll automatically give the label a for="" attribute. For example, this config: id: form auto_id: %f_%n elements: name: foo label: Foo produces this output: <form action="" id="form" method="post"> <div class="text label"> <label for="form_foo">Foo</label> <input name="foo" type="text" id="form_foo" /> </div> </form> auto_id() gives every field an id attribute, where %f is replaced by the form id, and %n is replaced by the field name. Cheers, Carl _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu