<?php /* * This file is ready to run as standalone example. However, please do: * 1. Add tags <html><head><body> to make a complete page * 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder */ $KoolControlsFolder = "../../../../KoolControls"; //Relative path to "KoolPHPSuite/KoolControls" folder require $KoolControlsFolder . "/KoolForm/koolform.php"; $myform_manager = new KoolForm("myform"); $myform_manager->scriptFolder = $KoolControlsFolder . "/KoolForm"; $myform_manager->styleFolder = "office2010silver"; $myform_manager->DecorationEnabled = true; //Button with Left Image $btnOK_left_image = new KoolButton("btnOK_left_image"); $btnOK_left_image->Text = "OK"; $btnOK_left_image->AutoPostback = true; $btnOK_left_image->LeftImage = $KoolControlsFolder . "/KoolForm/icons/plain/check2.png"; $myform_manager->AddControl($btnOK_left_image); $btnCancel_left_image = new KoolButton("btnCancel_left_image"); $btnCancel_left_image->Text = "Cancel"; $btnCancel_left_image->AutoPostback = true; $btnCancel_left_image->LeftImage = $KoolControlsFolder . "/KoolForm/icons/plain/delete2.png"; $myform_manager->AddControl($btnCancel_left_image); $btnViewInvoice_left_image = new KoolButton("btnViewInvoice_left_image"); $btnViewInvoice_left_image->Text = "View Invoice"; $btnViewInvoice_left_image->AutoPostback = true; $btnViewInvoice_left_image->LeftImage = $KoolControlsFolder . "/KoolForm/icons/plain/text.png"; $myform_manager->AddControl($btnViewInvoice_left_image); $btnRate_left_image = new KoolButton("btnRate_left_image");
<?php /* * This file is ready to run as standalone example. However, please do: * 1. Add tags <html><head><body> to make a complete page * 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder */ $KoolControlsFolder = "../../../../KoolControls"; //Relative path to "KoolPHPSuite/KoolControls" folder require $KoolControlsFolder . "/KoolForm/koolform.php"; $myform_manager = new KoolForm("myform"); $myform_manager->scriptFolder = $KoolControlsFolder . "/KoolForm"; $myform_manager->styleFolder = "sunset"; $myform_manager->DecorationEnabled = true; $txtPhone = $myform_manager->AddControl(new KoolMaskedTextBox("txtPhone")); $txtPhone->Mask = "(###) ###-####"; $txtPhone->PromptChar = "_"; $txtPhone->SelectionOnFocus = "SelectAll"; $txtIPAddress = $myform_manager->AddControl(new KoolMaskedTextBox("txtIPAddress")); $txtIPAddress->Mask = "<0..255>.<0..255>.<0..255>.<0..255>"; $txtIPAddress->SelectionOnFocus = "CaretToBeginning"; $txtVisaCreditCard = $myform_manager->AddControl(new KoolMaskedTextBox("txtVisaCreditCard")); $txtVisaCreditCard->Mask = "4### #### #### ####"; $txtVisaCreditCard->PromptChar = "_"; $txtVisaCreditCard->SelectionOnFocus = "SelectAll"; $txtSSN = $myform_manager->AddControl(new KoolMaskedTextBox("txtSSN")); $txtSSN->Mask = "###-##-####"; $txtSSN->PromptChar = "_"; $txtSSN->SelectionOnFocus = "SelectAll"; //Init form $myform_manager->Init();
<?php /* * This file is ready to run as standalone example. However, please do: * 1. Add tags <html><head><body> to make a complete page * 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder */ $KoolControlsFolder = "../../../../KoolControls"; //Relative path to "KoolPHPSuite/KoolControls" folder require $KoolControlsFolder . "/KoolForm/koolform.php"; $myform_manager = new KoolForm("myform"); $myform_manager->scriptFolder = $KoolControlsFolder . "/KoolForm"; $myform_manager->styleFolder = "office2010silver"; $myform_manager->DecorationEnabled = true; $play_stop = new KoolToggleButton("play_stop"); /*Below are the full API of AddOption method. * $play_stop->AddOption(array( "Text"=>"Play", "Value"=>"Play", "LeftImage"=>"/path/to/leftimage.png") "RightImage"=>"/path/to/rightimage.png") "LeftImageCss"=>"leftimage_css") "RightImageCss"=>"rightimage_css") "ButtonCss"=>"button_css") "ToolTip"=>"This is the button") ); */ $play_stop->AddOption(array("Text" => "Play", "Value" => "Play", "LeftImage" => $KoolControlsFolder . "/KoolForm/icons/plain/media_play_green.png", "ToolTip" => "Play radio")); $play_stop->AddOption(array("Text" => "Stop", "Value" => "Stop", "LeftImage" => $KoolControlsFolder . "/KoolForm/icons/plain/media_stop_red.png", "ToolTip" => "Stop radio")); $play_stop->Width = "60px";
<?php /* * This file is ready to run as standalone example. However, please do: * 1. Add tags <html><head><body> to make a complete page * 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder */ $KoolControlsFolder = "../../../../KoolControls"; //Relative path to "KoolPHPSuite/KoolControls" folder require $KoolControlsFolder . "/KoolListBox/koollistbox.php"; require $KoolControlsFolder . "/KoolForm/koolform.php"; $myform_manager = new KoolForm("myform"); $myform_manager->scriptFolder = $KoolControlsFolder . "/KoolForm"; $myform_manager->styleFolder = "sunset"; //$myform_manager->DecorationEnabled = true; $myform_manager->RenderWithExistingMarkup = true; $listbox = new KoolListBox("listbox"); $listbox->styleFolder = "vista"; $listbox->Width = "270px"; $listbox->Height = "260px"; $item = $listbox->AddItem(new ListBoxItem("Apple Iphone 5 - Black", "iphone5_black")); $item->Data = array("Capacity" => "16GB", "Price" => "USD 639"); $item = $listbox->AddItem(new ListBoxItem("Apple Iphone 5 - White", "iphone5_white")); $item->Data = array("Capacity" => "16GB", "Price" => "USD 639"); $item = $listbox->AddItem(new ListBoxItem("Apple The New Ipad - Black", "ipad_black")); $item->Data = array("Capacity" => "32GB", "Price" => "USD 599"); $item = $listbox->AddItem(new ListBoxItem("Apple The New Ipad - White", "ipad_white")); $item->Data = array("Capacity" => "32GB", "Price" => "USD 599"); $item = $listbox->AddItem(new ListBoxItem("Apple Ipod shuffle - Black", "ipod_black")); $item->Data = array("Capacity" => "2GB", "Price" => "USD 49"); $item = $listbox->AddItem(new ListBoxItem("Apple Ipod shuffle - White", "ipod_white"));
<?php /* * This file is ready to run as standalone example. However, please do: * 1. Add tags <html><head><body> to make a complete page * 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder */ $KoolControlsFolder = "../../../../KoolControls"; //Relative path to "KoolPHPSuite/KoolControls" folder require $KoolControlsFolder . "/KoolAjax/koolajax.php"; require $KoolControlsFolder . "/KoolGrid/koolgrid.php"; require $KoolControlsFolder . "/KoolForm/koolform.php"; $koolajax->scriptFolder = $KoolControlsFolder . "/KoolAjax"; $myform_manager = new KoolForm("myform"); $myform_manager->scriptFolder = $KoolControlsFolder . "/KoolForm"; $myform_manager->DecorationEnabled = true; $myform_manager->styleFolder = "sunset"; $myform_manager->Init(); ?> <form id="myform" method="post"> <style type="text/css"> .panel_class { width:230px; } </style> <?php echo $koolajax->Render(); ?> <?php
<?php /* * This file is ready to run as standalone example. However, please do: * 1. Add tags <html><head><body> to make a complete page * 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder */ $KoolControlsFolder = "../../../../KoolControls"; //Relative path to "KoolPHPSuite/KoolControls" folder require $KoolControlsFolder . "/KoolForm/koolform.php"; $myform_manager = new KoolForm("myform"); $myform_manager->scriptFolder = $KoolControlsFolder . "/KoolForm"; $myform_manager->styleFolder = "sunset"; $myform_manager->DecorationEnabled = true; $action = new KoolSplitButton("action"); /*Below are the full API of AddOption method. * $action->AddOption(array( "Text"=>"View order", "Value"=>"View", "LeftImage"=>"/path/to/leftimage.png") "RightImage"=>"/path/to/rightimage.png") "LeftImageCss"=>"leftimage_css") "RightImageCss"=>"rightimage_css") "ButtonCss"=>"button_css") "ToolTip"=>"This is the button") ); */ $action->AutoPostback = true; $action->AddOption(array("Text" => "Accept", "Value" => "accept_order", "LeftImage" => $KoolControlsFolder . "/KoolForm/icons/plain/check2.png", "ToolTip" => "Accept the order")); $action->AddOption(array("Text" => "View order", "Value" => "view_order", "LeftImage" => $KoolControlsFolder . "/KoolForm/icons/plain/text.png", "ToolTip" => "View details of the order"));
<?php /* * This file is ready to run as standalone example. However, please do: * 1. Add tags <html><head><body> to make a complete page * 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder */ $KoolControlsFolder = "../../../../KoolControls"; //Relative path to "KoolPHPSuite/KoolControls" folder require $KoolControlsFolder . "/KoolForm/koolform.php"; $myform_manager = new KoolForm("myform"); $myform_manager->scriptFolder = $KoolControlsFolder . "/KoolForm"; $myform_manager->styleFolder = "sunset"; $myform_manager->DecorationEnabled = true; $txtPassword = new KoolPasswordTextBox("txtPassword"); $txtPassword->ShowIndicator = true; $myform_manager->AddControl($txtPassword); $txtPassword_Confirm = new KoolPasswordTextBox("txtPassword_Confirm"); $myform_manager->AddControl($txtPassword_Confirm); $valCheckPass = new KoolCustomValidator("valCheckPass"); $valCheckPass->TargetId = "txtPassword_Confirm"; $valCheckPass->ClientValidationFunction = "check_password_consistence"; $valCheckPass->ErrorMessage = "Passwords are not the the same!"; $myform_manager->AddControl($valCheckPass); $password_required_validator = new KoolRequiredFieldValidator("txtPassword_val"); $password_required_validator->TargetId = "txtPassword"; $password_required_validator->ErrorMessage = "Please, enter a password!"; $myform_manager->AddControl($password_required_validator); //Init form $myform_manager->Init(); ?>
<?php /* * This file is ready to run as standalone example. However, please do: * 1. Add tags <html><head><body> to make a complete page * 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder */ $KoolControlsFolder = "../../../../KoolControls"; //Relative path to "KoolPHPSuite/KoolControls" folder require $KoolControlsFolder . "/KoolAjax/koolajax.php"; require $KoolControlsFolder . "/KoolForm/koolform.php"; $koolajax->scriptFolder = $KoolControlsFolder . "/KoolAjax"; $myform_manager = new KoolForm("myform"); $myform_manager->scriptFolder = $KoolControlsFolder . "/KoolForm"; $myform_manager->DecorationEnabled = true; $myform_manager->styleFolder = "sunset"; //Use the numeric textbox for Age $txtAge = $myform_manager->AddControl(new KoolNumericTextBox("txtAge")); //Use the masked textbox for phone $txtPhone = $myform_manager->AddControl(new KoolMaskedTextBox("txtPhone")); $txtPhone->Mask = "(###)-######"; $txtPhone->SelectionOnFocus = "CaretToBeginning"; //Create the required field validator for txtName $txtName_RequiredFieldValidator = $myform_manager->AddControl(new KoolRequiredFieldValidator("txtName_RequiredFieldValidator")); $txtName_RequiredFieldValidator->TargetId = "txtName"; $txtName_RequiredFieldValidator->ErrorMessage = "The textbox can not be empty!"; //Create the required field validator and range validator for txtName $txtAge_RequiredFieldValidator = $myform_manager->AddControl(new KoolRequiredFieldValidator("txtAge_RequiredFieldValidator")); $txtAge_RequiredFieldValidator->TargetId = "txtAge"; $txtAge_RequiredFieldValidator->ErrorMessage = "Please, select an year number!"; $txtAge_RangeValidator = $myform_manager->AddControl(new KoolRangeValidator("txtAge_RangeValidator"));
<?php /* * This file is ready to run as standalone example. However, please do: * 1. Add tags <html><head><body> to make a complete page * 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder */ $KoolControlsFolder = "../../../../KoolControls"; //Relative path to "KoolPHPSuite/KoolControls" folder require $KoolControlsFolder . "/KoolAjax/koolajax.php"; require $KoolControlsFolder . "/KoolForm/koolform.php"; $myform_manager = new KoolForm("myform"); $myform_manager->scriptFolder = $KoolControlsFolder . "/KoolForm"; $myform_manager->styleFolder = "sunset"; $myform_manager->DecorationEnabled = true; $txtNum1 = $myform_manager->AddControl(new KoolNumericTextBox("txtNum1")); $txtNum1->NumberFormat->PositivePattern = "n %"; $txtNum1->NumberFormat->NegativePattern = "(n %)"; $txtNum1->EmptyMessage = isset($_POST["txtEmptyMessage"]) ? $_POST["txtEmptyMessage"] : "Percentage"; $txtNum1->IncrementSettings->InterceptArrowKeys = isset($_POST["checkKeyboard"]) ? $_POST["checkKeyboard"] == "false" ? false : true : true; $txtNum1->IncrementSettings->InterceptMouseWheel = isset($_POST["checkMouseWheel"]) ? $_POST["checkMouseWheel"] == "false" ? false : true : true; $txtNum1->ShowSpinButton = isset($_POST["checkShowSpin"]) ? $_POST["checkShowSpin"] == "false" ? false : true : true; $txtNum1->SpinButtonPosition = isset($_POST["selectSpinButtonPosition"]) ? $_POST["selectSpinButtonPosition"] : "Right"; $txtNum2 = $myform_manager->AddControl(new KoolNumericTextBox("txtNum2")); $txtNum2->Value = 1000000; $txtNum2->ShowSpinButton = true; $txtNum2->IncrementSettings->InterceptArrowKeys = true; $txtNum2->IncrementSettings->InterceptMouseWheel = true; $txtNum2->NumberFormat->DecimalDigits = isset($_POST["selectDecimalDigits"]) ? $_POST["selectDecimalDigits"] : 1; $txtNum2->NumberFormat->DecimalSeparator = isset($_POST["selectDecimalSeparator"]) ? $_POST["selectDecimalSeparator"] : "."; $txtNum2->NumberFormat->GroupSeparator = isset($_POST["selectGroupSeparator"]) ? $_POST["selectGroupSeparator"] : " ";
<?php /* * This file is ready to run as standalone example. However, please do: * 1. Add tags <html><head><body> to make a complete page * 2. Change relative path in $KoolControlFolder variable to correctly point to KoolControls folder */ $KoolControlsFolder = "../../../../KoolControls"; //Relative path to "KoolPHPSuite/KoolControls" folder require $KoolControlsFolder . "/KoolForm/koolform.php"; $myform_manager = new KoolForm("myform"); $myform_manager->scriptFolder = $KoolControlsFolder . "/KoolForm"; $myform_manager->styleFolder = "sunset"; $myform_manager->DecorationEnabled = true; $txtName = $myform_manager->AddControl(new KoolTextBox("txtName")); $txtName->MaxLength = 10; $txtName->EmptyMessage = "John Smith"; $txtName->ToolTip = "What is your name?"; $txtDescription = $myform_manager->AddControl(new KoolTextBox("txtDescription")); $txtDescription->Mode = "multiline"; $txtDescription->EmptyMessage = "I am engineer!"; $txtDescription->ToolTip = "Tell us more about you!"; $txtDescription->Width = "200px"; $txtDescription->Height = "100px"; //Init form $myform_manager->Init(); ?> <form id="myform" method="post" class="decoration">