Mip-forms

Aus DeDi-Help

Wechseln zu: Navigation, Suche

Die mip-forms (Modul Input Forms) stellen Funktionen zur einfachen Erstellung von Formularen bereit und sind dazu gedacht, die Modulentwicklung im Bereich der Konfiguration zu beschleunigen. Dadurch kann die Modulkonfiguration sehr schnell und flexibel entwickelt werden, komplexe Konfigurationsmöglichkeiten werden ohne große Mühe möglich.


Inhaltsverzeichnis

[bearbeiten] Einleitendes Beispiel

Ein einfaches Beispiel:


Es wird ein Modul entwickelt, welches einen Text aus dem Seitenkonfigurationsdialog übernimmt und auf der Seite mit CSS- Styles formatiert ausgibt.


Programmcode für das Konfigurationfeld:

<?php 
$mip_form['0']['cat'] = 'txt';
$mip_form['0']['type'] = ''; 
$mip_form['0']['desc'] = 'Beschreibung';
$mip_form['0']['cms_var'] = "MOD_VAR[1]";
$mip_form['0']['cms_val'] = $dedi_mod['value']['1']; 
$mip_form['0']['cms_val_default'] = 'Hallo Welt';
$mip_form['0']['tab'] = '0';

$mip_form['1']['desc'] = "Stylesheet";
$mip_form['1']['cat'] = 'app_css'; 
$mip_form['1']['output_cat'] = 'option';
$mip_form['1']['type'] = ''; 
$mip_form['1']['cms_var'] = "MOD_VAR[2]";
$mip_form['1']['cms_val'] = $dedi_mod['value']['2'];
$mip_form['1']['flag'] = "id_only";

mip_formsp($mip_form['0']);
mip_formsp($mip_form['1']);

unset($mip_form);
?>

Die oben getätigte Eingabe führt dann im Konfigurationsdialog zu folgendem Ergebnis:


Programmcode für die Frontendausgabe (das Ergebnis grafisch, siehe Abbildung rechts):

MOD_VALUE[1]


Erklärung:

$mip_form['0']['cat'] = 'txt'
Die erste Zeile des ersten Blocks. In diesem Block wird das Textfeld definiert. Die Kategorie 'cat' hat die Bezeichnung "txt" und damit ein Textfeld (Zur Zeit stehen die Kategorien txtarea, option, chk, radio und app_x zur Verfügung).


$mip_form['0']['type'] = '';
'type' bestimmt das Aussehen des Textfeldes. Mögliche Werte sind , 'chk', 'radio', 'long', 'chk_long', 'radio_long'. Wird kein Wert angegeben (wie in diesem Beispiel), wird der Defaultwert '[Beschreibung] [Textbox]' genommen. Im "default"- Fall kann die Variable auch weggelassen werden. Die einzelenen type- Werte für Textfelder im Überblick:


[LEER]:
[Beschreibung][Textbox]

'chk':
[Checkbox] [Beschreibung] [Textbox]

'radio':
[Radiobutton] [Beschreibung] [Textbox]

'long':
[Beschreibung] [große Textbox]

'chk_long':
[Checkbox] [Beschreibung] [große Textbox]

'radio_long':
[Radiobutton] [Beschreibung] [große Textbox]


$mip_form['0']['desc']='Beschreibung';
Die Beschriftung des Textfeldes (Label)


$mip_form['0']['cms_var']=$dedi_mod['value']['1'];
$mip_form['0']['cms_val']='MOD_VALUE[1]';
Die Variable, in denen DeDi den Wert speichern wird.


$mip_form['0']['cms_val_default'] = 'Hallo Welt';
Ist die betreffende MOD_VAR[x] noch leer, wird ein defaultwert eingetragen.


$mip_form['0']['tab'] = '0';
Hiermit können Konfigurationsfelder eingerückt werden. Erleichtert die Übersicht bei komplexen Konfigurationen.


Es folgt der zweite Block. Hier wird der CSS- Parser konfiguriert.


$mip_form['1']['cat']='app_css';
Der CSS-Parser wird aufgerufen. Kleine Applikationen gehören bei den mip-forms immer in die Kategorie app_xxx


$mip_form['1']['output_cat']='option';
'output_cat' gibt die Kategorie an, wie das Formularfeld später beschaffen sein soll und entspricht im Endeffekt 'cat', 'option' oder 'radio' sind sinnvoll. Empfehlung: 'option'


$mip_form['1']['flag'] = 'id_only';
'flag' ist ein optionaler Parameter. 'id_only' parst nur css-Id's, 'class_only' parst nur css-Klassen. Es wird dringend empfohlen, diesen Parameter zu setzen, da hinterher keine Rückschlüsse mehr auf die Herkunft gezogen werden können (z.B. wird die Klasse ".class_or_id" später zu der Variablen 'class_or_id', ebenso wird die CSS- ID '#class_or_id' zur Variablen 'class_or_id'. Die Meisten Module benutzen die Option 'class_only'


mip_formsp($mip_form['0']);
mip_formsp($mip_form['1']);
Die Formulare werden ausgegeben. Das 'p' bei 'mip_formsp' steht für print, also für die direkte Ausgabe im Browser. Alternativ können die einzelnen Formularbausteine auch in Variablen abgespeichert werden. Dies geschieht dann in der Art von $meine_variable = mip_forms($mip_form['0']);


unset($mip_form);
Hier wird der Array mip_form[][] zerstört und der genutzte Speicher wieder freigegeben. Dies solltet ihr auf keinen Fall vergessen. Ich gehe einfach mal davon aus, dass bei der Modulentwicklung viele der hier angegebenen Beispiele per copy/ paste übernehmen werden. Daher wird in vielen Modulen der Array mip_form[][] vorkommen. Nicht zerstörte Arrays werden dann früher oder später dazu führen, dass einzelne Werte in verschiedenen Modulen miteinander kollidieren. Gerade die Typen 'option' und 'radio' werden davon betroffen sein. Im Konfigurationsbereich der Module gibt es bei nicht zurückgesetzten mip_form- Arrays noch ein zusätzliches Hindernis. Da auf Dehler bei der Modulbearbeitung hingewiesen wird, muß das Modul zwei mal ausgeführt werden. Einmal um das Modu zu testen und auf eventuelle Fehler aufmerksam zu machen und zum Anderen um die Ausgabe auf dem Bildschirm auszugeben. Wird hier das "unset" vergessen, sind Einträge in den Dropdownboxen zumeist doppelt vorhanden.

[bearbeiten] Referenz

[bearbeiten] Beschreibungsfelder

[Beschreibung]


Beispiel:

$mip_form['0']['cat'] = 'desc';
 $mip_form['0']['type'] = ''; 
 $mip_form['0']['desc'] = 'Beschreibung';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Checkbox][Beschreibung]


Beispiel:

$mip_form['0']['cat'] = 'desc';
 $mip_form['0']['type'] = 'chk'; 
 $mip_form['0']['desc'] = 'Beschreibung';
 $mip_form['0']['chk_var'] = 'MOD_VAR[0]';
 $mip_form['0']['chk_val'] = $dedi_mod['value']['0']; 
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Radiobutton][Beschreibung]


Beispiel:

$mip_form['33']['cat'] = 'desc';
 $mip_form['33']['type'] = 'radio'; 
 $mip_form['33']['desc'] = 'Beschreibung';
 $mip_form['33']['radio_var'] = 'MOD_VAR[34]';
 $mip_form['33']['radio_val'] = $dedi_mod['value']['34']; 
 $mip_form['33']['radio_val_default'] = '';
 $mip_form['33']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert';
 $mip_form['33']['tab'] = '0';
 
 mip_formsp($mip_form['33']);

[bearbeiten] Textfelder

[Beschreibung][Textbox]

Beispiel:

$mip_form['0']['cat'] = 'txt';
 $mip_form['0']['type'] = ''; 
 $mip_form['0']['desc'] = 'Beschreibung';
 $mip_form['0']['cms_var'] = 'MOD_VAR[1]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['1']; 
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Checkbox][Beschreibung][Textbox]


Beispiel:


$mip_form['0']['cat'] = 'txt';
 $mip_form['0']['type'] = 'chk'; 
 $mip_form['0']['desc'] = 'Beschreibung';
 $mip_form['0']['chk_var'] = 'MOD_VAR[0]';
 $mip_form['0']['chk_val'] = $dedi_mod['value']['0']; 
 $mip_form['0']['cms_var'] = 'MOD_VAR[1]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['1'];
 $mip_form['0']['cms_val_default'] = ''; 
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);



[Radiobutton][Beschreibung][Textbox]

Beispiel:

$mip_form['0']['cat'] = 'txt';
 $mip_form['0']['type'] = 'radio'; 
 $mip_form['0']['desc'] = 'Beschreibung Radiotext';
 $mip_form['0']['radio_var'] = 'MOD_VAR[0]';
 $mip_form['0']['radio_val'] = $dedi_mod['value']['0']; 
 $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert'; 
 $mip_form['0']['radio_val_default'] = '';
 $mip_form['0']['cms_var'] = 'MOD_VAR[1]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['1']; 
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Textbox]


Beispiel:


$mip_form['0']['cat'] = 'txt';
 $mip_form['0']['type'] = 'long'; 
 $mip_form['0']['desc'] = 'Beschreibung';
 $mip_form['0']['cms_var'] = 'MOD_VAR[1]';
 $mip_form['0']['cms_val'] =$dedi_mod['value']['1']; 
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Checkbox][Beschreibung][Textbox]


Beispiel:


$mip_form['0']['cat'] = 'txt';
 $mip_form['0']['type'] = 'chk_long'; 
 $mip_form['0']['desc'] = 'Beschreibung';
 $mip_form['0']['chk_var'] = 'MOD_VAR[0]';
 $mip_form['0']['chk_val'] =$dedi_mod['value']['0']; 
 $mip_form['0']['cms_var'] = 'MOD_VAR[1]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['1'];
 $mip_form['0']['cms_val_default'] = ''; 
 $mip_form['0']['tab'] = '0';

 mip_formsp($mip_form['0']);


[Radiobutton][Beschreibung][Textbox]


Beispiel:


$mip_form['0']['cat'] = 'txt';
 $mip_form['0']['type'] = 'radio_long'; 
 $mip_form['0']['desc'] = 'Beschreibung Radiotext';
 $mip_form['0']['radio_var'] = 'MOD_VAR[0]';
 $mip_form['0']['radio_val'] = $dedi_mod['value']['0']; 
 $mip_form['0']['radio_val_default'] = '';
 $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert';
 $mip_form['0']['cms_var'] = 'MOD_VAR[1]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['1']; 
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);

[bearbeiten] Textareas

[Beschreibung][Textarea]


Beispiel:


$mip_form['0']['cat'] = 'txtarea';
 $mip_form['0']['rows'] = '3';
 $mip_form['0']['type'] = '';
 $mip_form['0']['desc'] = 'Beschreibung';
 $mip_form['0']['cms_var'] = 'MOD_VAR[1]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['1'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Checkbox][Beschreibung][Textarea]


Beispiel:


$mip_form['0']['cat'] = 'txtarea';
 $mip_form['0']['rows'] = '';
 $mip_form['0']['type'] = 'chk';
 $mip_form['0']['desc'] = 'Beschreibung';
 $mip_form['0']['chk_var'] = MOD_VAR[0]';
 $mip_form['0']['chk_val'] = '$dedi_mod['value']['0'];
 $mip_form['0']['cms_var'] ='MOD_VAR[1]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['1'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Radiobutton] [Beschreibung] [Textarea]


Beispiel:


$mip_form['0']['cat'] = 'txtarea';
 $mip_form['0']['rows'] = '3';
 $mip_form['0']['type'] = 'radio';
 $mip_form['0']['desc'] = 'Beschreibung Radiotext';
 $mip_form['0']['radio_var'] = 'MOD_VAR[0]';
 $mip_form['0']['radio_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert';
 $mip_form['0']['radio_val_default'] = '';
 $mip_form['0']['cms_var'] = 'MOD_VAR[1]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['1'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Beschreibung]
[Textarea]


Beispiel:


$mip_form['0']['cat'] = 'txtarea';
 $mip_form['0']['rows'] = '3';
 $mip_form['0']['type'] = 'long';
 $mip_form['0']['desc'] = 'Beschreibung';
 $mip_form['0']['cms_var'] = 'MOD_VAR[1]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['1'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Checkbox] [Beschreibung] [Textarea]


Beispiel:


$mip_form['0']['cat'] = 'txtarea';
 $mip_form['0']['rows'] = '3';
 $mip_form['0']['type'] = 'chk_long';
 $mip_form['0']['desc'] = 'Beschreibung';
 $mip_form['0']['chk_var'] = 'MOD_VAR[0]';
 $mip_form['0']['chk_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['cms_var'] = 'MOD_VAR[1]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['1'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Radiobutton] [Beschreibung]
[Textarea]


Beispiel:


$mip_form['0']['cat'] = 'txtarea';
 $mip_form['0']['rows'] = '3';
 $mip_form['0']['type'] = 'radio_long';
 $mip_form['0']['desc'] = 'Beschreibung Radiotext';
 $mip_form['0']['radio_var'] = 'MOD_VAR[0]';
 $mip_form['0']['radio_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert';
 $mip_form['0']['radio_val_default'] = '';
 $mip_form['0']['cms_var'] = 'MOD_VAR[1]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['1'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['tab'] = '0';
  
 mip_formsp($mip_form['0']);

[bearbeiten] Optionsfelder

[Beschreibung] [Option x1] [Optionbeschreibung x1]
[Option x2] [Optionbeschreibung x2]
[Option x3] [Optionbeschreibung x3]
... ...


Beispiel:


$mip_form['0']['cat'] = 'option';
 $mip_form['0']['type'] = '';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['size'] = 1;
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


oder für ein mehrzeiliges Optionsfeld (hier ist der Parameter "size" > 1 zu setzen):


$mip_form['0']['cat'] = 'option';
 $mip_form['0']['type'] = 'long';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['size'] = '3';
 $mip_form['0']['flag'] = 'multiple';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Checkbox] [Beschreibung] [Option x1] [Optionbeschreibung x1]
[Option x2] [Optionbeschreibung x2]


Beispiel:


$mip_form['0']['cat'] = 'option';
 $mip_form['0']['type'] = 'chk';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['chk_var'] = 'MOD_VAR[4]';
 $mip_form['0']['chk_val'] = $dedi_mod['value']['4'];
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] =$dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Radiobutton] [Beschreibung] [Option x1] [Optionbeschreibung x1] [Option x2] [Optionbeschreibung x2]


Beispiel:


$mip_form['0']['cat'] = 'option';
 $mip_form['0']['type'] = 'radio';
 $mip_form['0']['desc'] = 'Beschreibung';
 $mip_form['0']['radio_var'] = 'MOD_VAR[4]';
 $mip_form['0']['radio_val'] = $dedi_mod['value']['4'];
 $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert';
 $mip_form['0']['radio_val_default'] = '';
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] =$dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);

[Beschreibung]
[Option x1] [Optionbeschreibung x1]
[Option x2] [Optionbeschreibung x2]
[Option x3] [Optionbeschreibung x3]
...


Beispiel:


$mip_form['0']['cat'] = 'option';
 $mip_form['0']['type'] = 'long';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] =$dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);

[Checkbox]
[Beschreibung] [Option x1] [Optionbeschreibung x1]
[Option x2] [Optionbeschreibung x2]
...


Beispiel:


$mip_form['0']['cat'] = 'option';
 $mip_form['0']['type'] = 'chk_long';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['chk_var'] = 'MOD_VAR[4]';
 $mip_form['0']['chk_val'] = $dedi_mod['value']['4'];
 $mip_form['0']['chk_val_default'] = '';
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Radiobutton]
[Beschreibung] [Option x1] [Optionbeschreibung x1]
[Option x2] [Optionbeschreibung x2]


Beispiel:


$mip_form['0']['cat'] = 'option';
 $mip_form['0']['type'] = 'radio_long';
 $mip_form['0']['desc'] = 'Beschreibung:';
 $mip_form['0']['radio_var'] = 'MOD_VAR[4]';
 $mip_form['0']['radio_val'] = $dedi_mod['value']['4'];
 $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert';
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);

[bearbeiten] Radiobuttons

[Beschreibung] [Radiobutton x1] [Radiobuttonbeschreibung x1]
[Radiobutton x2] [Radiobuttonbeschreibung x2]
[Radiobutton x3] [Radiobuttonbeschreibung x3]


Beispiel:


$mip_form['0']['cat'] = 'radio';
 $mip_form['0']['type'] = '';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Checkbox] [Beschreibung] [Radiobutton x1] [Radiobuttonbeschreibung x1]
[Radiobutton x2] [Radiobuttonbeschreibung x2]


Beispiel:


$mip_form['0']['cat'] = 'radio';
 $mip_form['0']['type'] = 'chk';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['chk_var'] = 'MOD_VAR[4]';
 $mip_form['0']['chk_val'] = $dedi_mod['value']['4'];
 $mip_form['0']['chk_val_default'] = '';
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['tab'] = '0';
  
 mip_formsp($mip_form['0']);


[Radiobutton] [Beschreibung] [Radiobutton x1] [Radiobuttonbeschreibung x1]
[Radiobutton x2] [Radiobuttonbeschreibung x2]


Beispiel:


$mip_form['0']['cat'] = 'radio';
 $mip_form['0']['type'] = 'radio';
 $mip_form['0']['desc'] = 'Beschreibung';
 $mip_form['0']['radio_var'] = 'MOD_VAR[4]';
 $mip_form['0']['radio_val'] = $dedi_mod['value']['4'];
 $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert';
 $mip_form['0']['radio_val_default'] = 'wenn_radio_val_leer__dieser_wert';
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['tab'] = '0';
  
 mip_formsp($mip_form['0']);


[Beschreibung]
[Radiobutton x1] [Radiobuttonbeschreibung x1]
[Radiobutton x2] [Radiobuttonbeschreibung x2]
[Radiobutton x3] [Radiobuttonbeschreibung x3]


Beispiel:


$mip_form['0']['cat'] = 'radio';
 $mip_form['0']['type'] = 'long';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Checkbox]
[Beschreibung] [Radiobutton x1] [Radiobuttonbeschreibung x1]
[Radiobutton x2] [Radiobuttonbeschreibung x2]


Beispiel:


$mip_form['0']['cat'] = 'radio';
 $mip_form['0']['type'] = 'chk_long';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['chk_var'] = 'MOD_VAR[4]';
 $mip_form['0']['chk_val'] = $dedi_mod['value']['4'];
 $mip_form['0']['chk_val_default'] = '';
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Radiobutton]
[Beschreibung] [Radiobutton x1] [Radiobuttonbeschreibung x1]
[Radiobutton x2] [Radiobuttonbeschreibung x2]


Beispiel:


$mip_form['0']['cat'] = 'radio';
 $mip_form['0']['type'] = 'radio_long';
 $mip_form['0']['desc'] = 'Beschreibung:';
 $mip_form['0']['radio_var'] = 'MOD_VAR[4]';
 $mip_form['0']['radio_val'] = $dedi_mod['value']['4'];
 $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert';
 $mip_form['0']['radio_val_default'] = '';
 $mip_form['0']['cms_var'] = 'MOD_VAR[0]';
 $mip_form['0']['cms_val'] = $dedi_mod['value']['0'];
 $mip_form['0']['cms_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Option 1';
 $mip_form['0']['option_val']['0'] = 'val1';
 $mip_form['0']['option_desc']['1'] = 'Option 2';
 $mip_form['0']['option_val']['1'] = 'val2';
 $mip_form['0']['option_desc']['2'] = '';
 $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);

[bearbeiten] Checkboxen

[Beschreibung] [Checkbox x1] [Checkboxbeschreibung x1]
[Checkbox x2] [Checkboxbeschreibung x2]
[Checkbox x3] [Checkboxbeschreibung x3]


Beispiel:


$mip_form['0']['cat'] = 'chk';
 $mip_form['0']['type'] = '';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['option_desc']['0'] = 'Checkbox 1';
 $mip_form['0']['option_var']['0'] = 'MOD_VAR[0]';
 $mip_form['0']['option_val']['0'] = $dedi_mod['value']['0'];
 $mip_form['0']['option_val_select']['0'] = 'gecheckt';
 $mip_form['0']['option_desc']['1'] = 'Checkbox 2';
 $mip_form['0']['option_var']['1'] = 'MOD_VAR[1]';
 $mip_form['0']['option_val']['1'] = $dedi_mod['value']['1'];
 $mip_form['0']['option_val_select']['1'] = 'gecheckt';
 $mip_form['0']['option_desc']['2'] = 'Checkbox 3';
 $mip_form['0']['option_var']['2'] = 'MOD_VAR[2]';
 $mip_form['0']['option_val']['2'] = $dedi_mod['value']['2'];
 $mip_form['0']['option_val_select']['2'] = 'gecheckt';
 $mip_form['0']['tab'] = '0';

mip_formsp($mip_form['0']);


[Checkbox] [Beschreibung] [Checkbox x1] [Checkboxbeschreibung x1]
[Checkbox x2] [Checkboxbeschreibung x2]


Beispiel:


$mip_form['0']['cat'] = 'chk';
 $mip_form['0']['type'] = 'chk';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['chk_var'] = 'MOD_VAR[4]';
 $mip_form['0']['chk_val'] = $dedi_mod['value']['4'];
 $mip_form['0']['chk_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Checkbox 1';
 $mip_form['0']['option_var']['0'] = 'MOD_VAR[0]';
 $mip_form['0']['option_val']['0'] = $dedi_mod['value']['0'];
 $mip_form['0']['option_val_select']['0'] = 'gecheckt';
 $mip_form['0']['option_desc']['1'] = 'Checkbox 2';
 $mip_form['0']['option_var']['1'] = 'MOD_VAR[1]';
 $mip_form['0']['option_val']['1'] = $dedi_mod['value']['1'];
 $mip_form['0']['option_val_select']['1'] = 'gecheckt';
 $mip_form['0']['option_desc']['2'] = 'Checkbox 3';
 $mip_form['0']['option_var']['2'] = 'MOD_VAR[2]';
 $mip_form['0']['option_val']['2'] = $dedi_mod['value']['2'];
 $mip_form['0']['option_val_select']['2'] = 'gecheckt';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Radiobutton] [Beschreibung] [Checkbox x1] [Checkboxbeschreibung x1]
[Checkbox x2] [Checkboxbeschreibung x2]


Beispiel:


$mip_form['0']['cat'] = 'chk';
 $mip_form['0']['type'] = 'radio';
 $mip_form['0']['desc'] = 'Radiobuttonbeschreibung:';
 $mip_form['0']['radio_var'] = 'MOD_VAR[4]';
 $mip_form['0']['radio_val'] = $dedi_mod['value']['4'];
 $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert';
 $mip_form['0']['radio_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Checkbox 1';
 $mip_form['0']['option_var']['0'] = 'MOD_VAR[0]';
 $mip_form['0']['option_val']['0'] = $dedi_mod['value']['0'];
 $mip_form['0']['option_val_select']['0'] = 'gecheckt';
 $mip_form['0']['option_desc']['1'] = 'Checkbox 2';
 $mip_form['0']['option_var']['1'] = 'MOD_VAR[1]';
 $mip_form['0']['option_val']['1'] = $dedi_mod['value']['1'];
 $mip_form['0']['option_val_select']['1'] = 'gecheckt';
 $mip_form['0']['option_desc']['2'] = 'Checkbox 3';
 $mip_form['0']['option_var']['2'] = 'MOD_VAR[2]';
 $mip_form['0']['option_val']['2'] = $dedi_mod['value']['2'];
 $mip_form['0']['option_val_select']['2'] = 'gecheckt';
 $mip_form['0']['tab'] = '0';

 mip_formsp($mip_form['0']);


[Beschreibung]
[Checkbox x1] [Checkboxbeschreibung x1]
[Checkbox x2] [Checkboxbeschreibung x2]
[Checkbox x3] [Checkboxbeschreibung x3]


Beispiel:


$mip_form['0']['cat'] = 'chk';
 $mip_form['0']['type'] = 'long';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['option_desc']['0'] = 'Checkbox 1';
 $mip_form['0']['option_var']['0'] = 'MOD_VAR[0]';
 $mip_form['0']['option_val']['0'] = $dedi_mod['value']['0'];
 $mip_form['0']['option_val_select']['0'] = 'gecheckt';
 $mip_form['0']['option_desc']['1'] = 'Checkbox 2';
 $mip_form['0']['option_var']['1'] = 'MOD_VAR[1]';
 $mip_form['0']['option_val']['1'] = $dedi_mod['value']['1'];
 $mip_form['0']['option_val_select']['1'] = 'gecheckt';
 $mip_form['0']['option_desc']['2'] = 'Checkbox 3';
 $mip_form['0']['option_var']['2'] = 'MOD_VAR[2]';
 $mip_form['0']['option_val']['2'] = $dedi_mod['value']['2'];
 $mip_form['0']['option_val_select']['2'] = 'gecheckt';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Checkbox]
[Beschreibung] [Checkbox x1] [Checkboxbeschreibung x1]
[Checkbox x2] [Checkboxbeschreibung x2]


Beispiel:


$mip_form['0']['cat'] = 'chk';
 $mip_form['0']['type'] = 'chk_long';
 $mip_form['0']['desc'] = 'Auswahl:';
 $mip_form['0']['chk_var'] = 'MOD_VAR[4]';
 $mip_form['0']['chk_val'] = $dedi_mod['value']['4'];
 $mip_form['0']['option_desc']['0'] = 'Checkbox 1';
 $mip_form['0']['option_var']['0'] = 'MOD_VAR[0]';
 $mip_form['0']['option_val']['0'] = $dedi_mod['value']['0'];
 $mip_form['0']['option_val_select']['0'] = 'gecheckt';
 $mip_form['0']['option_desc']['1'] = 'Checkbox 2';
 $mip_form['0']['option_var']['1'] = 'MOD_VAR[1]';
 $mip_form['0']['option_val']['1'] = $dedi_mod['value']['1'];
 $mip_form['0']['option_val_select']['1'] = 'gecheckt';
 $mip_form['0']['option_desc']['2'] = 'Checkbox 3';
 $mip_form['0']['option_var']['2'] = 'MOD_VAR[2]';
 $mip_form['0']['option_val']['2'] = $dedi_mod['value']['2'];
 $mip_form['0']['option_val_select']['2'] = 'gecheckt';
 $mip_form['0']['tab'] = '0';
 
 mip_formsp($mip_form['0']);


[Radiobutton]
[Beschreibung] [Checkbox x1] [Checkboxbeschreibung x1]
[Checkbox x2] [Checkboxbeschreibung x2]


Beispiel:


$mip_form['0']['cat'] = 'chk';
 $mip_form['0']['type'] = 'radio_long';
 $mip_form['0']['desc'] = 'Radiobuttonbeschreibung:';
 $mip_form['0']['radio_var'] = 'MOD_VAR[4]';
 $mip_form['0']['radio_val'] = $dedi_mod['value']['4'];
 $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert';
 $mip_form['0']['radio_val_default'] = '';
 $mip_form['0']['option_desc']['0'] = 'Checkbox 1';
 $mip_form['0']['option_var']['0'] = 'MOD_VAR[0]';
 $mip_form['0']['option_val']['0'] = $dedi_mod['value']['0'];
 $mip_form['0']['option_val_select']['0'] = 'gecheckt';
 $mip_form['0']['option_desc']['1'] = 'Checkbox 2';
 $mip_form['0']['option_var']['1'] = 'MOD_VAR[1]';
 $mip_form['0']['option_val']['1'] = $dedi_mod['value']['1'];
 $mip_form['0']['option_val_select']['1'] = 'gecheckt';
 $mip_form['0']['option_desc']['2'] = 'Checkbox 3';
 $mip_form['0']['option_var']['2'] = 'MOD_VAR[2]';
 $mip_form['0']['option_val']['2'] = $dedi_mod['value']['2'];
 $mip_form['0']['option_val_select']['2'] = 'gecheckt';
 $mip_form['0']['tab'] = '0'; 

mip_formsp($mip_form['0']);

[bearbeiten] Hidden

Erstellt ein unsichtbares hidden- Formularfeld


[hiddenformularfeld]


Beispiel:


$mip_form['0']['cat'] = 'hidden';
$mip_form['0']['cms_var'] = $dedi_mod['value']['0'];
$mip_form['0']['cms_val'] = 'mein_wert';

mip_formsp($mip_form['0']);

[bearbeiten] Applikation

Erstellt Formularfelder, in denen schon bestimmte DeDi Funktionalitäten enthalten sind. Eine Applikation wird mit "$mip_form['X']['cat'] = 'app_XXX'" initialisiert. "$mip_form['output_cat']" gibt die Kategorie an, wie das Formularfeld später beschaffen sein soll. 'option' oder 'radio' werden unterstützt. Empfehlung: 'option'


[bearbeiten] CSS- Styles

Stellt eine Liste aller intern verfügbaren Stylesheets zur Verfügung.


$mip_form['flag'] ist ein optionaler Parameter. 'id_only' parst nur css-Id's, 'class_only' parst nur css-Klassen. Es wird dringend empfohlen, diesen Parameter zu setzen, da hinterher keine Rückschlüsse mehr auf die Herkunft gezogen werden können (z.B. wird die Klasse ".class_or_id" später zu der Variablen 'class_or_id', ebenso wird die CSS- ID '#class_or_id' zur Variablen 'class_or_id'.


Beispiel:


$mip_form['3']['desc'] = "Stylesheet";
$mip_form['3']['cat'] = 'app_css'; 
$mip_form['3']['output_cat'] = 'option';
$mip_form['3']['type'] = ; 
$mip_form['3']['cms_var'] = "MOD_VAR[3]";
$mip_form['3']['cms_val'] = $dedi_mod['value']['3'];
$mip_form['3']['cms_val_default'] = ; 
$mip_form['3']['flag'] = "class_only";

mip_formsp($mip_form['3']);

[bearbeiten] Ordner

Zeigt eine Liste aller verfügbaren Ordner des Bereiches Redaktion-> Seiten an.

$mip_form['X']['without_root_cat'] = false/ true;
Ist dieser Wert auf true gesetzt, wird die Option "root" nicht angezeigt. Standardmässig ist die Option mit "false" vorbelegt.

$mip_form['X']['without_this_cat'] = false/ true;
Ist dieser Wert auf true gesetzt, wird die Option "Dieser Ordner" nicht angezeigt. Standardmässig ist die Option mit "false" vorbelegt.


Beispiel:


$mip_form['3']['desc'] = "Ordner";
$mip_form['3']['cat'] = 'app_cat'; 
$mip_form['3']['output_cat'] = 'option';
$mip_form['3']['size'] = 3; 
$mip_form['3']['cms_var'] = "MOD_VAR[3]";
$mip_form['3']['cms_val'] = $dedi_mod['value']['3'];

mip_formsp($mip_form['3']);

[bearbeiten] Dateitypen

Zeigt alle Dateitypen an, welche im Dateimanager verfügbar sind (z.B. jpg, gif, fla, doc...).


Beispiel:

$mip_form['3']['desc'] = "Dateitypen";
$mip_form['3']['cat'] = 'app_filetype'; 
$mip_form['3']['output_cat'] = 'option';
$mip_form['3']['size'] = 3; 
$mip_form['3']['cms_var'] = "MOD_VAR[3]";
$mip_form['3']['cms_val'] = $dedi_mod['value']['3'];

mip_formsp($mip_form['3']);

[bearbeiten] Verzeichnisse/ Ordner (Dateimanager)

Zeigt alle verfügbaren Ordner des Dateimanagers an.


$mip_form['X']['without_all_folders'] = false/ true;
Ist dieser Wert auf true gesetzt, wird die Option "Alle Ordner" nicht angezeigt. Standardmässig ist die Option mit "false" vorbelegt.


Beispiel:


$mip_form['3']['desc'] = "Ordner des Dateimanagers";
$mip_form['3']['cat'] = 'app_directory';
$mip_form['3']['output_cat'] = 'option';
$mip_form['3']['size'] = 3; 
$mip_form['3']['cms_var'] = "MOD_VAR[3]"; 
$mip_form['3']['cms_val'] = $dedi_mod['value']['3'];

mip_formsp($mip_form['3']);

[bearbeiten] Benutzergruppen

Zeigt alle verfügbaren Gruppen aus dem Bereich Administration-> Gruppen an.


$mip_form['X']['without_all_groups'] = false/ true;
Ist dieser Wert auf true gesetzt, wird die Option "Alle Ordner" nicht angezeigt. Standardmässig ist die Option mit "false" vorbelegt.


Beispiel:


$mip_form['3']['desc'] = "Wählen Sie eine Gruppe";
 $mip_form['3']['cat'] = 'app_group';
 $mip_form['3']['output_cat'] = 'option';
 $mip_form['3']['size'] = 3;
 $mip_form['3']['cms_var'] = "MOD_VAR[3]";
 $mip_form['3']['cms_val'] = $dedi_mod['value']['3'];
 
 mip_formsp($mip_form['3']);
Persönliche Werkzeuge