Overview

Classes

  • Api1
  • Array1
  • ArrayObject1
  • Auth1
  • AuthModel1
  • Chat1
  • Class1
  • Color1
  • Console1
  • Controller1
  • Converter1
  • Cookie1
  • Date1
  • DateManager1
  • Db1
  • DbPref1
  • EasyBook
  • EasyCountry
  • EasyGenerator
  • EasyProduct
  • EasyProject
  • EasySchool
  • EasyStatus
  • exApiController1
  • exBlade1
  • exClass
  • exData1
  • exMail1
  • exRoute1
  • exTranslate1
  • exUrl1
  • FileManager1
  • FilePref1
  • Form1
  • Function1
  • Header1
  • Html1
  • HtmlAsset1
  • HtmlForm1
  • HtmlStyle1
  • HtmlWidget1
  • Math1
  • Model1
  • Model1FileLocator
  • Number1
  • Object1
  • Page1
  • Picture1
  • Popup1
  • QUESTION_TYPE
  • RecursiveArrayObject1
  • RegEx1
  • ResultObject1
  • ResultStatus1
  • ServerRequest1
  • Session1
  • SessionPreferenceSave1
  • String1
  • TaskManager1
  • Url1
  • Validation1
  • Value1

Interfaces

  • Controller1RouteInterface
  • Model1ActionInterface
  • Model1PageInterface

Functions

  • __
  • api_and_form_default_route
  • app
  • app_api_list
  • app_class_list
  • app_class_paths
  • app_class_with_interface
  • app_controller_list
  • app_dashboard_list
  • app_db_model_list
  • app_db_table_list
  • app_model_list
  • app_page_list
  • asset
  • csrf_token
  • current_layout_asset
  • current_plugin_asset
  • current_resources_asset_path
  • d
  • dd
  • file_base
  • file_session
  • file_session_get
  • file_session_remove
  • file_session_save
  • form_call_api
  • form_call_controller
  • form_token
  • get_all_view_in_directory
  • get_valid_view_path
  • is_token_valid
  • is_ajax_request
  • layout_asset
  • mailer
  • mailer_send_mail_to_list
  • make_default_route
  • makeRoute
  • normalizeSharedPath
  • now
  • now_date
  • now_time
  • old
  • paginate
  • path_app
  • path_asset
  • path_asset_url
  • path_clear_cache
  • path_main
  • path_main_url
  • path_shared
  • path_shared_app
  • path_shared_asset
  • path_shared_asset_url
  • path_shared_resources
  • path_to_viewpath
  • plugin_asset
  • pre
  • redirect
  • redirect_back
  • redirect_failed
  • redirect_to_view
  • register_path_for_layout_asset
  • request
  • resources_path
  • resources_path_asset
  • resources_path_cache
  • resources_path_plugin
  • resources_path_view
  • resources_path_view_cache
  • resources_path_view_layout
  • route
  • routes
  • shared_asset
  • token
  • translate_language
  • translated_language
  • url
  • view
  • view_exists
  • view_make
  • viewpath_to_path
  • Overview
  • Class

Class HtmlForm1

Located at easycore/EasyForm.php
Methods summary
public
# __construct( $model1, $visibleField = [], $invisibleField = [], $hiddenField = ['id', 'created_at', 'updated_at', 'last_login_at'] )
public
# addFields( array $fieldName_equals_defaultValue = [] )
public
# addBreakBeforeField( array $fieldName_equals_breakTitle = [] )
public
# setModel( $model1 )
public
# setTitle( $title )
public
# setVisibleField( array $fieldNameList = [] )
public
# setHiddenField( array $fieldNameList = [] )
public
# setInvisibleField( array $fieldNameList = [] )
public
# setLabelNames( array $fieldName_equals_displayName = ['oldName'=>'newName', ] )
public
# setFieldAttribute( array $fieldName_equals_properties = ['user_name'=>['type'=>'text', 'tag'=>'input', 'style'=>'color:black']] )

Set Property of Field, Like Html Attribute Property, All Control Make use of value attr for there value multi attribute is allowed with coma separated, e.g ->setFieldAttribute([ 'about, address'=>['style'=>'height:200px;'], 'phone_number'=>['type'=>'number'] ])

Set Property of Field, Like Html Attribute Property, All Control Make use of value attr for there value multi attribute is allowed with coma separated, e.g ->setFieldAttribute([ 'about, address'=>['style'=>'height:200px;'], 'phone_number'=>['type'=>'number'] ])

Parameters

$fieldName_equals_properties

Returns


$this
public
# setValue( $fieldName, $fieldValue )
public
# setSimilarFieldAttribute( array $fieldNameList = ['user_name', 'full_name'], array $attribute_equals_value = ['type'=>'text', 'required'] )
public
# setFieldGroupAttribute( array $fieldName_equals_properties = ['user_name'=>['class'=>'form-group']] )
public
# getFields( $filter_hidden_out = false )
public static
# process( $btnSubmitName = 'btn_submit', $modelClass = 'User', $id = "-1", $uniqueColumn = [] )
public null|string
# render( null $overrideTag = null, string $defaultValueIfNull = '' )

Display All Allowed Model Field

Display All Allowed Model Field

Parameters

$overrideTag
This will force all element to display will the tag[ could be 'label', 'input', 'textarea', or other control tagName]
$defaultValueIfNull

Returns

null|string
public
# renderAsArray( $listAsMenu = false, $renameOldName_equals_newName = [] )
public
# renderTable( array $column_list = [], $column_list_as_invisible = false, $whereRawClause = '', callable $onCreate = null, callable $onUpdate = null, callable $onDelete = null )
public static
# open( $processControllerMethod = "HtmlForm1@process()", $formAttribute = [''] )
public static
# close( $submitValue = 'Submit', $submitButtonAttribute = ['name'=>'btn_submit'] )
public static
# submit( $value = '', $inputAttribute = ['name'=>'btn_submit'] )
public static
# addLabel( $title = '', $value = '' )
public static
# add( $name, $input_raw_code )
public static string
# make( string $labelName = null, string $tagName = '', string $data = '', array $inputAttribute = [], array $formGroupAttribute = [] )

Turn Simple Array to Html Control and Assign Attribute

Turn Simple Array to Html Control and Assign Attribute

Parameters

$labelName
$tagName
$data
$inputAttribute
$formGroupAttribute

Returns

string
public static
# outputAs( $data = null )
public static
# addFile( $labelName = null, $inputAttribute = [], $formGroupAttribute = [] )
public static
# addHidden( $name_orNameValueList, $value = '' )
public static array
# extractValue( array $attribute = ['value' => null, 'name'=>null] )

get value from $_REQUEST or ArrayData Passed to Control Value ($userInfo)

get value from $_REQUEST or ArrayData Passed to Control Value ($userInfo)

Parameters

$attribute

Returns

array
public static null|string
# addInput( null $LabelValueOrAttr = null, array $inputAttribute = [], array $formGroupAttribute = [] )

Add Input (default text) add toggle=true for password input to show toggleable password field... or use HtmlForm1::addPassword(...) instead

Add Input (default text) add toggle=true for password input to show toggleable password field... or use HtmlForm1::addPassword(...) instead

Parameters

$LabelValueOrAttr
$inputAttribute
$formGroupAttribute

Returns

null|string

Throws

Exception
public static null|string
# addPassword( null $LabelValueOrAttr = null, array $inputAttribute = [], array $formGroupAttribute = [] )

this enable toggle attribute for input field and type=password

this enable toggle attribute for input field and type=password

Parameters

$LabelValueOrAttr
$inputAttribute
$formGroupAttribute

Returns

null|string

Throws

Exception
public static string
# addTextArea( null $LabelValueOrAttr = null, array $textAreaAttribute = [], array $formGroupAttribute = [] )

Add TextArea component

Add TextArea component

Parameters

$LabelValueOrAttr
$textAreaAttribute
$formGroupAttribute

Returns

string
public static string
# addMany( $controlId, integer $initCount = 2 )

Multiply Form Control Widget. Automatic Add More Button and Delete Button

Multiply Form Control Widget. Automatic Add More Button and Delete Button

Parameters

$controlId
$initCount

Returns

string
public static string
# addSelect( string $LabelValueOrAttr = '', boolean $selectAttribute = [], array $formGroupAttribute = [], array $useValueAsKey = false )

Parameters

$LabelValueOrAttr
$selectAttribute
$useValueAsKey
$formGroupAttribute

$selectAttribute

Default Select value: selected = value to be selected link = api data link

$useValueAsKey
$formGroupAttribute

Returns

string
'';
public static
# addPanel( $label, $content )
public static
# addModal( $label, $content )
Properties summary
public static boolean $FLAG_SHOW_EXEC_ARRAY
# false
public static string $BREAK_DELIMITER
# '<h4 style="border-bottom: 2px solid #9f9f9f;color: #757575;margin-top:45px;padding-bottom:5px;"> %s </h4><br/>'
public $tagName
# null
public $model
# null
public array $title
# []
public array $allowFields
# []
public array $denyFields
# []
public array $breakFields
# []
public array $manualModel
# []
public array $fieldGroup_equals_properties
# []
public array $fieldName_equals_properties
# []
public array $fieldName_equals_displayName
# []
public array $tag_equals_attribute
# []
public static boolean $USE_REQUEST_VALUE
# true
public static boolean $AUTO_PLACEHOLDER
# true
public static boolean $ENABLE_TOGGLE_PASSWORD_INPUT
# false
public static boolean $AUTO_ID_SET_FROM_NAME
# true
public static boolean $AUTO_LABEL
# false
public static string $THEME
# 'bootstrap'
public static boolean $AS_VERTICAL
# true
public static string $THEME_FORM_INPUT_CLASS
# 'form-control form-control-lg input-lg'
public static string $THEME_LABEL_CLASS
# 'control-label'
public static string $THEME_FORM_GROUP_CLASS
# 'form-group'
public static string $THEME_COL_CLASS
# 'col col-'
public static string $THEME_BUTTON_CLASS
# 'btn btn-lg btn-'
API documentation generated by ApiGen