Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Php Quickform Grouprule for Html-Select and Html-Input Group needed -


i'm working on big html form. use php quickform create , validate it. form has few groups consist of input-textfield , select-field. code 1 of groups

looks this:

$autoren = array("0" => "", "1" => "bob", "2" => "harry", "3" => "autor 3"); $arr[] = &html_quickform::createelement('text', 'autort', 'autortext', array('size' => 37, 'maxlength' => 50)); $arr[] = &html_quickform::createelement('select', 'autoro', 'autoroptions', $autoren); $form->addgroup($arr, 'autoren', 'autor:', '<br />'); 

i'm in desperate need of kind of rule/grouprule validates group in following way:

  1. if both fields empty -> error.
  2. if 1 of fields has value in it, other 1 must empty, otherwise -> error.
  3. if both fields have values in them, must match, otherwise -> error.

can explain me how can accomplish that? tried write custom rule, somehow code never called validate method.

if you're using html_quickform2, chaining rules _and() , _or() makes possible want. qf1, it's not possible (except using callback rule on form).


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -