htm_Input htm_Input() used for input and output of values of various variables htm_Table Example on module htm_Table() htm_Card Example and notes about htm_Card() Page layout About making page layout Navigate About menues an link buttons Others Buttons, Messages and dialog
Test site and documentation for Clever html engine • Errors may occur and future news may be shown • ver.1.4.1: 60+ core functions.
Overview over the system functions:TOGGLE-height: Click icon to toggle viewHeight for this card WIDE: Click to maximize/normalize this card widthCOLLAPSE: Click to close all cards;" EXPAND: Click to open all cards;"
php2html.lib.php 2510:htm_GoTopButt(labl:'@Top', icon:'fa-solid fa-arrow-up', hint:'@Go to page top', styl:'');
php2html.lib.php 5673:htm_hr(colr:'#0',attr:'');
php2html.lib.php 2775:htm_Humantest(capt:'@Are you human? ', icon:'fa-solid fa-arrow-right-to-bracket', hint:'@Grab and slide to right to change state',
php2html.lib.php 2198:htm_Wrapp_(vhgh:'400px'); WrapperCard - open
php2html.lib.php 2203:htm_Wrapp_end(); WrapperCard - close
Total: 64 htm_Functions Tip: Hovering the mouse over function names displays a short description.
PHP parameters variants:TOGGLE-height: Click icon to toggle viewHeight for this card WIDE: Click to maximize/normalize this card widthCOLLAPSE: Click to close all cards;" EXPAND: Click to open all cards;"
Important about function parameters:
From PHP 8.0 you can give parameters to functions as:
Named arguments
--> Specify only required parameters, skipping optional ones. (free order!)
--> Arguments are order-independent and self-documented.
On PHP 7+ the order of parameters was fixed, and could not be omitted.
Be aware of PHP 7.4 is a supported version until 2023/24 !
Advanced functions catalog:TOGGLE-height: Click icon to toggle viewHeight for this card WIDE: Click to maximize/normalize this card widthCOLLAPSE: Click to close all cards;" EXPAND: Click to open all cards;"
Details about the most used and complex system functions. htm_Card()
The function output: Comming soon !
PHP-code for calling htm_Card():
function htm_Card_(
capt: '', # string: The card caption
icon: '', # string: icon to the left of caption
hint: '', # string: The hint on hover caption
form: '', # string: form id/name (No form without a name)
acti: '', # string: form action
clas: 'cardWmax', # string: The card class (general CSS-data)
wdth: '', # string: The closed card width
styl: 'background-color: white;', # string: The card body style
attr: '', # string: general attributes (style) for the card-container
show: true, # bool: Show card-buttons top-right
head: 'background-color: white;', # string: Style for Header background
vhgh: '600px', # string: MaxHeight (ViewHeight) for span (HideBody) with scrollable content
help: '' # string: Link to custom Card-help)
function htm_Card_end(
labl: '', # string: Label on the submit button
icon: '', # string: Icon left to label
hint: '', # string: Hint on hover the submit button
name: '', # string: The name of the button to submit
form: '', # string: The name of the form to submit
subm: false, # bool: Submit button shown and active
attr: '', # string: Button attributes. Generel use e.g. action= "$link"
akey: '', # string: Shortcut to activate the button
kind: 'save', # string: The button appearance
simu: false # bool: Button only simulate
)
The generated HTML-code: Comming soon !
Declaring of the function:
function htm_Card_(
$capt= '', # string: The card caption
$icon= '', # string: icon to the left of caption
$hint= '', # string: The hint on hover caption
$form= '', # string: form id/name (No form without a name)
$acti= '', # string: form action
$clas= 'cardWmax', # string: The card class (general CSS-data)
$wdth= '', # string: The closed card width
$styl= 'background-color: white;', # string: The card body style
$attr= '', # string: general attributes (style) for the card-container
$show= true, # bool: Show card-buttons top-right
$head= 'background-color: white;', # string: Style for Header background
$vhgh= '600px', # string: MaxHeight (ViewHeight) for span (HideBody) with scrollable content
$help= '' # string: Link to custom Card-help)
function htm_Card_end(
$labl= '', # string: Label on the submit button
$icon= '', # string: Icon left to label
$hint= '', # string: Hint on hover the submit button
$name= '', # string: The name of the button to submit
$form= '', # string: The name of the form to submit
$subm= false, # bool: Submit button shown and active
$attr= '', # string: Button attributes. Generel use e.g. action= "$link"
$akey= '', # string: Shortcut to activate the button
$kind= 'save', # string: The button appearance
$simu= false # bool: Button only simulate
)
Some special notes: htm_Card() do not exist, but
htm_Card_() - to prepare the card
htm_Carde_end() - to finalize the card
htm_Inbox()
The function output: Comming soon !
PHP-code for calling htm_Inbox(): Comming soon !
The generated HTML-code: Comming soon !
Declaring of the function: Comming soon !
htm_Input()
The function output: Comming soon !
PHP-code for calling htm_Input():
function htm_Input(# labl:'',plho:'@Enter...',icon:'',hint:'',vrnt: 'text',name:'',valu:'',form:'',wdth:'',algn:'left',attr:'',rtrn:false,unit:'',disa:false,rows:'2',step:'',list:[],llgn:'R',bord:'',ftop:'');
# Generel order:
$labl= '', # string: Translated label above the input field
$plho= '@Enter...', # string: Translated placeholder shown when field is empty. Default: Enter...
$icon= '', # string: The icon left of the label (label prefix)
$hint= '', # string: Translated description for the field
$vrnt= 'text', # string: Variant - 'text', 'date', ... Look at source !
$name= '', # string: Set the fields name (and id)
$valu= '', # string: The current content in input field
$form= '', # string: With Local form given, click on label to submit
$wdth= '100%', # string: Width of the field-container
$algn= 'left', # string: The alignment of input content Default: left
$attr= '', # string: Give more (special / non system) input attrib to the input
$rtrn= false, # bool: Act as procedure: Echo result, or as function: Return string
# htm_Input() only:
$unit= '', # string: A unit added to the content eg. currency or % If in front: '<' it is added as a prefix, else a suffix
$disa= false, # bool: Disable the field. Default: field is active
$rows= '2', # string: Number of rows in multiline input (eg. area/html) Default: 2 (Radio/Check-list: 1 to output horisontal)
$step= '', # string: the value of stepup/stepdown for numbers
$list= [], # array: Data for subitems in "multi-list" (eg. options, checkbox, radiolist) {opti:value,label,hint,attr}
$llgn= 'R', # string: Label align Default: Right
$bord= '', # string: BoxBorder color to mark required/optional field. Default= 'border: 1px solid var(--grayColor);'
$ftop= '' # string: Ajust field vertical position
)
The generated HTML-code: Comming soon !
Declaring of the function: Comming soon !
htm_Page()
There are normerly no visibly output from this function: but you can set a title, a hint and info or a background-image.
PHP-code for calling htm_Page():
function htm_Page_(
titl:'', # string: Page title
hint:'', # string: Page tip (vertical text - left)
info:'', # string: Page into (vertical text - right)
inis:'', # string: Initial CSS/js script in page header
algn:'center', # string: align background-image
imag:'', # string: Page background-image
attr:'', # string: Page attributes
pbrd:true # bool: Draw border around the page body-div
)
function htm_Page_end(); # End of page - has no parameters
function htm_Page_(# titl:'', hint:'', info:'', inis:'', algn:'center', gbl_Imag:'', attr:'', gbl_Bord:true)
$titl='', # string: Page title
$hint='', # string: Page tip (vertical text - left)
$info='', # string: Page into (vertical text - right)
$inis='', # string: Initial CSS/js script in page header
$algn='center', # string: align background-image
$imag='', # string: Page background-image
$attr='', # string: Page attributes
$pbrd=true # bool: Draw border around the page body-div
)
# Page content must be given between htm_Page_() and htm_Page_end()
function htm_Page_end(); # End of page - has no parameters
Some special notes: htm_Page() do not exist, but use
htm_Page_() - to prepare the page
htm_Page_end() - to finalize the page
htm_Table()
The function output: Caption: Inland VAT (incoming):
No. .No. {Editable}
Description Enter text... {Editable}
Account Account... {Editable}
%-rate 25 %... {Editable}
Note .?. {Editable}
Delete Click the red cross to delete a entry
Create an empty row, so you can fill in data in the yellow fields !
Table-note:
PHP-code for calling htm_Table():
htm_Table(capt: array(
['Caption: <b>'.lang('@Inland').'</b>', '8%','show','left', '', '@VAT on India','@PURCHASE'],
['@VAT (incoming): ', '34%','show','left', '', '','@The VAT you must return from the Tax Agency']
),
pref: array(),
body: array(
['@No.', '10%','text','',['center'],'@Position number in the group','.No.'],
['@Description', '26%','data','',['left' ],'@Item Description. A descriptive text of your choice','@Enter text...'],
['@Account', '10%','data','',['center'],'@The number in the statement of account to which the sales tax must be posted.','Account...'],
['@%-rate', '10%','data','',['center'],'@VAT % rate','25 %...'],
['@Note', '40%','text','',['left' ],'@Note about the record','.?.'],
),
suff: array(
['@Delete', '4%','butt','',['center'],'@Click the red cross to delete a entry', '<ic class="far fa-times-circle" style="color:red; font-size:13px; "></ic>'],
),
note: 'Table-note:',
data: $arrData,
filt: true,
sort: true,
crea: true,
modi: true,
vhgh: '200px',
styl: 'background-image: none;',
from: __FILE__,
list: ['',''],
expo: '',
rtrn: false
);
function htm_Table(# capt:[], pref:[], body:[]',suff:[], note:'', data:[],filt:true,sort:true,crea:true, modi:true, vhgh:'400px', styl:'', from:__FILE__,list:[],expo:'', rtrn:true);
$capt= [ # ['0:Label', '1:Width', '2:Type', '3:OutFormat', '4:horJust', '5:Tip', '6:placeholder', '7:Content';], ...
],
$pref= [ # ['0:ColLabl', '1:ColWidth', '2:ContType', '3:OutFormat', '4:[horJust_etc]', '5:ColTip', '6:Html'], ...
],
$body= [ # ['0:ColLabl', '1:ColWidth', '2:ContType', '3:OutFormat', '4:[horJust_etc]', '5:fldKey', '6:ColTip','7:placeholder','8:default','9:[selectList]'], ...
], # Field 4: $FieldProporties - is composed of: [horJust, FieldBgColor, FieldStyle, TdColor, SorterON, FilterON, SelectON,
$suff= [ # ['0:ColLabl', '1:ColWidth', '2:ContType', '3:OutFormat', '4:[horJust_etc]', '5:ColTip', '6:value! '], ...
],
$note= '', # string: HTML-string - note to be shown below the table
&$data, # array: [{"name_0":value_0, "name_1":value_1, "name_2":value_2, "name_3":value_3, "name_4":value_4, "name_5":value_5, "name_6":value_6, "name_7":value_7, "name_8":value_8, "name_9":value_9},{...},{...}]
$filt= true, # bool: Ability to hide records that do not match filter // Does not work with hidd fields!
$sort= true, # bool: Ability to sort records by column content
$crea= true, # bool: Ability to create a records - string: Labeltext on createButton
$modi= true, # bool: Ability to select and change data in a row
$vhgh= '400px', # string: The height of the visible part of the table's data$styl= '', # string: Style for the span that holds the table;
$from= __FILE__, # string: = __FILE__ / __FUNCTION__ (debugging: locate error)
$list= ['',''], # array: LookupLists for options // Test [DataKolonneNr, > grænseværdi] Undlad spec. FieldColor
$expo= '' # string: Export values in table data fields to CSV-file
$rtrn= true # bool: Function Return or echo result
)
htm_Tabs()
The function output: Comming soon !
PHP-code for calling htm_Tabs(): Comming soon !
The generated HTML-code: Comming soon !
Declaring of the function: Comming soon !
Some special notes: All names must be unique on a page. There are no function "htm_Tabs()" but use these tree:
htm_Tabs_() - to prepare the element
htm_Tab() - to create a single tab
htm_Tabs_end() - to finalize the element
Other functions:TOGGLE-height: Click icon to toggle viewHeight for this card WIDE: Click to maximize/normalize this card widthCOLLAPSE: Click to close all cards;" EXPAND: Click to open all cards;"
In addition to system functions, php2html.php contains declarations for
other functions without prefix: htm_
They are usable in your project, but are only documented in php2html.php