Zum Inhalt springen

Selectorbox mit Flexforms erstellen

Erstellt am 22. August 2007 · 2 Antworten · letzte Antwort am 22. August 2007

Tags: Frage

SirRuddy ·

Hallo,

ich möchte die Optionen meines Plugins mittels Flexforms erstellen. Konkret möchte ich in einer Selectorbox Datensätze auswählen. Zum Teil funktioniert das auch. Ich bekomme schon mal EINE Selectorbox mit meinen bereits angelegten Datensätzen, und das +(Plus) um neue Datensätze anzulegen (was auch funzt). Ich befürchte das es mit der XML-Struktur zu tun hat. Ich glaube das ich irgend etwas vergessen habe, um meine Arrays abzugrenzen. Die Arrays <list> und <edit> werden offensichtlich gar nicht ausgeführt. Ich versuche das mit folgendem XML-Code:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<t3datastructure>
   <meta />
      <langdisable>1</langdisable>
   </meta>
   <sheets>
<srelation>
      	<root>
            <tceforms>
               <sheettitle>Angebote zuweisen</sheettitle>
            </tceforms>
            <type>array</type>
            <el>
               <angebote>
                  <tceforms>
                     <exclude>1</exclude>
                     <label>Auswahl:</label>
                     <config>
                        <type>select</type>
                        <foreign_table>tx_liste5spalten_main</foreign_table>
                        <foreign_table_where>ORDER BY tx_liste5spalten_main.uid</foreign_table_where>
                        <size>8</size>
                        <min>0</min>
                        <max>8</max>
                        <wizards>
                        	<_PADDING>2</_padding>
                        	<_VERTICAL>1</_vertical>
                        	<add>
                        		<type>script</type>
                        		<title>Neuen Eintrag erstellen</title>
                        		<icon>add.gif</icon>
                        		<params>
                        			<table>tx_liste5spalten_main</table>
                        			<pid>###CURRENT_PID###</pid>
                        			<setvalue>prepend</setvalue>
                        		</params>
                        		<script type="text/javascript">wizard_add.php</script>
                        	</add>
                        </wizards>
                        <list>
                        	<type>script</type>
                        	<title>Liste</title>
                        	<icon>list.gif</icon>
                        	<params>
                        		<table>tx_liste5spalten_main</table>
                        		<pid>###CURRENT_PID###</pid>
                        	</params>
                        	<script type="text/javascript">wizard_list.php</script>
                        </list>
                        <edit>
                        	<type>popup</type>
                        	<title>Bearbeiten</title>
                        	<script type="text/javascript">wizard_edit.php</script>
                        	<popup_onlyopenifselected>1</popup_onlyopenifselected>
                        	<icon>edit2.gif</icon>
                                <jsopenparams>height=350, width=580, status=0, menubar=0, scrollbars=1</jsopenparams>
                        </edit>
                     </config>
                  </tceforms>
               </angebote>
            </el>
         </root>
      </srelation>
</sheets>
</t3datastructure>

Bin für jede Hilfe dankbar!
Gruß
SirRuddy

SirRuddy ·

Ich habe mich übrigens vertan: Ich möchte keine Selectorbox erstellen, sondern eine Database Relation!

Einen Teilerfolg konnte ich auch bereits selber erzielen. Damit die Elemente <list> und <edit> angezeigt werden, musste das </wizards> aus Zeile 39 hinter das </edit> in Zeile 57. Aber ich vermisse noch immer das Feld, in dem die ausgewählten Datensätze angezeigt werden...? - Hilfe!

Gruß
SirRuddy

SirRuddy ·

Hab's hinbekommen. Eigentlich nur:

  • <pid>###CURRENT_PID###</pid> gegen eine '0' ersetzt
    <add>, <list> und <edit> neu sortiert und
    <_PADDING>2</_PADDING> in 1 geändert.

Voilá - Selbst ist der Mann 😉

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<T3DataStructure>
   <meta>
      <langDisable>1</langDisable>
   </meta>
   <sheets>
      <sRELATION>
         <ROOT>
            <TCEforms>
               <sheetTitle>Angebote zuweisen</sheetTitle>
            </TCEforms>
            <type>array</type>
            <el>
               <angebote>
                  <TCEforms>
                     <exclude>1</exclude>
                     <label>Auswahl:</label>
                     <config>
                        <type>select</type>
                        <foreign_table>tx_liste5spalten_main</foreign_table>
                        <foreign_table_where>ORDER BY tx_liste5spalten_main.uid</foreign_table_where>
                        <size>10</size>
                        <maxitems>8</maxitems>
                        <wizards>
                           <_PADDING>1</_PADDING>
                           <_VERTICAL>1</_VERTICAL>
                           <edit>
                           		<type>popup</type>
                           		<title>Bearbeiten</title>
                           		<script>wizard_edit.php</script>
                          	 	<popup_onlyOpenIfSelected>1</popup_onlyOpenIfSelected>
                          	 	<icon>edit2.gif</icon>
                          	 	<JSopenParams>height=350,width=580,status=0,menubar=0,scrollbars=1</JSopenParams>
                        	</edit>
                           <add>
                              <type>script</type>
                              <title>Neuer Eintrag</title>
                              <icon>add.gif</icon>
                              <params>
                                 <table>tx_liste5spalten_main</table>
                                 <pid>0</pid>
                                 <setValue>prepend</setValue>
                              </params>
                              <script>wizard_add.php</script>
                           </add>
                        <list>
                           <type>script</type>
                           <title>Liste</title>
                           <icon>list.gif</icon>
                           <params>
                              <table>tx_liste5spalten_main</table>
                              <pid>0</pid>
                           </params>
                           <script>wizard_list.php</script>
                        </list>
                        
                        </wizards>
                     </config>
                  </TCEforms>
               </angebote>
            </el>
         </ROOT>
      </sRELATION>
   </sheets>
</T3DataStructure>