0% found this document useful (0 votes)
28 views

Bootstrap Datetimepicker Min Css Example

This document describes PHP Bootstrap Form, an open source library for generating HTML forms using PHP. It includes over 30 different form elements like textboxes, checkboxes, selects, etc. that can be generated with concise method calls. Each element includes customizable attributes. The library also includes methods for opening/closing forms and handling form submissions.

Uploaded by

Bobbie N Ananda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Bootstrap Datetimepicker Min Css Example

This document describes PHP Bootstrap Form, an open source library for generating HTML forms using PHP. It includes over 30 different form elements like textboxes, checkboxes, selects, etc. that can be generated with concise method calls. Each element includes customizable attributes. The library also includes methods for opening/closing forms and handling form submissions.

Uploaded by

Bobbie N Ananda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Copyright (c) 2015-2016 Alexander V.

Butenko
Version: 4.1-master
https://github.com/avbdr/php-bootstrap-form

1) Button
Form::Button("label", "type", array(properties));
✔ attributes
 type: default=submit, (submit, button, reset)
 properties
• required
• class
• value: text
• ...
Example:
Form::Button("Login", "button", array("autofocus" => "","icon"=>"fa fa-sign-in ","value"=>"Login"));
Form::Button("Ok", "submit", array("name" => "approve", "disabled" => "disabled","formtarget"=>"_blank"));
Form::Button("Cancel", "button", array("onclick" => "history.go(-1);"));

2) CKEditor

3) Captcha

4) Checkbox
Form::Checkbox("label", "name|id", array(values), array(attributes));
 attributes
• inline
• value
• required
• ...

Example:
Form::Checkbox("Level", "ProfLevels", array(0 => "Exc", 1 => "med"), array("value" => "med"));
Form::Checkbox("Level", "ProfLevels", array("poor", "med"), array("inline" => 1, "value" => "poor"));
Form::Checkbox("", "remember", array("1" => "Remember me"));
5) Checksort

6) Color

7) Country

8) Date
Form::Date("label", "name|id", array(properties));
 properties
• required
• title
• placeholder
• ...

Example:
Form::Date();
Form::Date("Date", "date");
Form::Date("Age", date('Y-m-d'), array("title" => "input date", "required" => 1));

9) DateTime

10) DateTimeLocal

11) Email (extended from Textbox)


Form::Email("label", "name|id", array(properties));
 properties
• required
• title
• placeholder
• ...
Example:
Form::Email("label", "name", array("required" => 1, "prepend" => "@", "placeholder" => "[email protected]"));

12) FaCalendar
Form::FaCalendar("label", "name|id", array(properties));
Dependencies:
shares/UI/css/bootstrap-datepicker.min.css
shares/UI/js/bootstrap-datepicker.min.js
shares/UI/js/bootstrap-datepicker.fa.min.js

 properties
• required
Example:
Form::FaCalendar("‫"تاریخ‬, "FaDate", array("required" => 1));

13) File (extended from Textbox)


Form::File("label", "name|id", array(properties));
 properties
• required
• title
• placeholder
• ...
Example:
Form::File("Attachment File", "attachment", array("append" => "Exception"));

14) HTML
Form::HTML(‘values’);
Example:
Form::HTML('<h4>PFBC/PHP Form Builder Class</h4>');

15) Hidden
Form::Hidden("name", "value", array(properties));
Example:
Form::Hidden("id", "12", array("required" => 1));

16) Month

17) Number (extended from Textbox)


Form::Number("label", "name|id", array(properties));
 properties
• required
• title
• placeholder
• ...
Example:
Form::Number("Counts", "cnt", array("required" => 1, "append" => "counts", "min" => 0));

18) Password (extended from Textbox)


Form::Password("label", "name|id", array(properties));
 properties
• required
• title
• ...
Example:
Form::Password ("Password", "password", array("required" => 1));

19) Phone

20) Radio
Form::Radio("label", "name|id", array(values), array(attributes));
 attributes
• inline
• value
• required
• ...

Example:
Form::Radio("Level", "LVL", array('1' => "poor", '2' => "med"), array("inline" => 1, "value" => '1', "required" => 1));

21) Range

22) Search

23) SearchableSelect (extended from Select)


Form::SearchableSelect("label", "name|id", array(values), array(attributes));
 attributes
• value
• required
• multiple
• ...
Example:
Form::SearchableSelect("Level", "LVL", Array('1' => 'option #1', '2' => 'option #2', '3' => 'option #3'),
array('required' => 1, 'multiple' => 1));
24) Select
Form::Select("label", "name|id", array(values), array(attributes));
 attributes
• value
• required
• multiple
• ...
Example:
Form::Select(“Level", "LVL", Array('1' => 'Exc', '2' => 'Good'),
array('value' => '2', 'shared' => "col-xs-6 col-md-4", 'multiple' => 1));

25) Sort

26) SpanStart

27) State

28) Textarea
Form::Textarea("label", "name", array(attributes));
 attributes
• rows
• required
• ...
Example:
Form::Textarea("Description", "desc",
array('required' => 1, 'rows' => 2, 'maxlength' => '100', 'placeholder' => 'Inset your description:', ‘style’ => "resize: vertical"));

29) Textbox
Form::Textbox("label", "name", array(attributes));
 attributes
• value
• required
• multiple
...
Example:
Form::Textbox("Name", "name",
array('required' => 1, 'maxlength' => '30', 'placeholder' => 'Inset your text:', 'pattern' => '[A-Za-z]{30}'));

30) Time

31) TinyMCE

32) Url

33) Week

34) YesNo (extended from Radio)


Form::YesNo("label", "name|id", array(attributes));
 attributes
• inline
• value
• required
• ...

Example:
Form::YesNo("Level", "LVL", array("inline" => 1, "value" => 'Yes', "required" => 1));

35) jQueryUIDate

- Form::open
Form::open($formId, $values = null, $opts = null)
 $opts
• ajax
• action
• view
• enctype
• ...
Examples:
Form::open ("levelForm", array('id' => '12'),
array ('ajax' => 'finishCallback', 'view' => 'Inline|Vertical|SideBySide4','enctype' => 'multipart/form-data'));

<script>
function finishCallback (data) {
alert('approved');
}
</script>

- Form::close
Form::close could be one of the following types: Form::$SUBMIT, false.
Examples:
Form::close (false); Just close a form. No need to generate extra buttons
Form::close( Form::$SUBMIT ); Add submit and Cancel button. Close a form after that
Form::close (); Display: Remove and Submit buttons as Defaults
Form::close(99); Display: Submit button

You might also like