FormResource
class FormResource (View source)
Class to manage forms for the module resource
\remarks Utilisation: $formresource = new FormResource($db) \remarks $formplace->proprietes=1 ou chaine ou tableau de valeurs
Properties
| DoliDB | $db | ||
| array<string, string> | $substit | ||
| array<string, mixed> | $param | ||
| string | $error |
Methods
Output html form to select a resource
Return html list of tickets type
Return a select list with zip codes and their town
Returns the drop-down list of departments/provinces/cantons for all countries or for a given country.
Details
__construct(DoliDB $db)
Constructor
select_resource_list(int|int[] $selected = 0, string $htmlname = 'fk_resource', $filter = '', int<0, 1> $showempty = 0, $showtype = 0, $forcecombo = 0, $event = [], $filterkey = '', $outputmode = 0, $limit = 20, $morecss = 'minwidth100', $multiple = false)
Output html form to select a resource
select_types_resource($selected = '', string $htmlname = 'type_resource', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $usejscombo = 0, $morecss = 'minwidth100')
Return html list of tickets type
@param string $selected Id du type pre-selectionne
select_ziptown($selected = '', string $htmlname = 'zipcode', $fields = array(), $fieldsize = 0, $disableautocomplete = 0, $moreattrib = '', $morecss = '')
Return a select list with zip codes and their town
@param string $selected Preselected value
select_state(int $selected = 0, $country_codeid = 0, $htmlname = 'state_id', $morecss = 'maxwidth200onsmartphone minwidth300')
Returns the drop-down list of departments/provinces/cantons for all countries or for a given country.
In the case of an all-country list, the display breaks on the country. The key of the list is the code (there can be several entries for a given code but in this case, the country field differs). Thus the links with the departments are done on a department independently of its name.