Björn Lindner
Beiträge: 56
Registriert: 30. Jan 2012, 12:53

Modul Eingabe Problem

17. Mär 2017, 23:01

hi,

vermutlich ein Anfängerfehler, aber ich bekomme es nicht gelöst. :(

Code: Alles auswählen

<!-- *******************************************************
OEFFNUNGSZEITEN
******************************************************** -->

<script type="text/javascript">
jQuery(function($){
	$(document).ready(function(){

		$('select#choices').change(function() {
			$('.off').hide();

			for(var i = 1; i <= parseInt($(this).val()); i++) {
				$('#row' + i).show();
			}
		});

		$('select#choices').change();

	})
});
</script>

<fieldset class="form-horizontal">
    <div class="form-group">
        <label class="col-sm-2 control-label" for="choices">Zeilen</label>
        <div class="col-sm-10">
			<?php
				$options = array(
				'2'=>'2 Zeilen',
				'3'=>'3 Zeilen',
				'4'=>'4 Zeilen',
				'5'=>'5 Zeilen',
				'6'=>'6 Zeilen',
				'7'=>'7 Zeilen',
				'8'=>'8 Zeilen',
				'9'=>'9 Zeilen'
			);
			?>
			<select name="REX_INPUT_VALUE[1]" id="choices" class="form-control">
			<?php foreach ($options as $k=>$v) : ?>
			<option value="<?php echo $k; ?>"<?php if ($k == "REX_VALUE[1]") echo ' selected="selected"' ?>><?php echo $v; ?></option>
			<?php endforeach ?>
			</select>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="headline">Überschrift</label>
        <div class="col-sm-10">
            <input class="form-control" id="headline" type="text" name="REX_INPUT_VALUE[2]" value="REX_VALUE[2]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="redactor_1">Text</label>
        <div class="col-sm-10">
            <textarea cols="1" rows="6" class="form-control redactorEditor-full" id="redactor_1" name="REX_INPUT_VALUE[3]"> REX_VALUE[3] </textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="letztes">letztes Element</label>
        <div class="col-sm-10">
					<?php
						$options = array(
						''=>'nein',
						'true'=>'ja'
					);
					?>
					<select name="REX_INPUT_VALUE[4]" id="letztes" class="form-control">
					<?php foreach ($options as $l=>$w) : ?>
					<option value="<?php echo $l; ?>"<?php if ($l == "REX_VALUE[4]") echo ' selected="selected"' ?>><?php echo $w; ?></option>
					<?php endforeach ?>
					</select>
        </div>
    </div>

</fieldset>

<fieldset class="form-horizontal">
    <legend>1. Zeile / Wochentag</legend>

	<br><section class="rex-page-section">
		<div class="panel panel-default">

			<header class="panel-heading collapsed" data-toggle="collapse" data-target="#collapse-REX_SLICE_ID" aria-expanded="false">
				<div class="panel-title"><i class="rex-icon rex-icon-info"></i> Hinweis</div>
			</header>

			<div id="collapse-REX_SLICE_ID" class="panel-collapse collapse" aria-expanded="false" style="height: 0px;">

				<div class="panel-body" style="background: #f3f6fb;">
					<ul>
						<li>In der ersten Zeile wird nur der Wochentag in der ersten Spalte gepflegt.</li>
						<li>Ab der 2. Zeile gibt es folgende Konvention des Aufbaus:</li>
						<ul>
							<li>Erste Spalte = Uhrzeit (Pflichtfeld)</li>
							<li>Zweite Spalte = Ereignisbezeichnung (Pflichtfeld)</li>
							<li>Dritte Spalte = weitere Details zu dem Ereignis (diese werden dann im Mouseover angezeigt und sind optional)</li>
						</ul>
						<li>Der, ab der 2. Zeile, mögliche Link sollte auf die entsprechende Inhaltsseite zu dem Ereignis führen oder leer bleiben.</li>
					</ul>
				</div>
			</div>
		</div>
	</section>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_1">Wochentag</label>
        <div class="col-sm-10">
            <input class="form-control" id="markitup_1" type="text" name="REX_INPUT_VALUE[10]" value="REX_VALUE[10]" />
        </div>
    </div>
</fieldset>

<fieldset class="form-horizontal off" id="row2">
    <legend>2. Zeile / Ereignis</legend>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_20">Uhrzeit</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_20" type="text" name="REX_INPUT_VALUE[20]" value=" REX_VALUE[20] " />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_21">Ereignis</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_21" type="text" name="REX_INPUT_VALUE[21]" value=" REX_VALUE[21] " />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_22">weitere Infos</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_22" type="text" name="REX_INPUT_VALUE[22]" value=" REX_VALUE[22] " />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_23">interner Link</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_23" type="text" name="REX_INPUT_VALUE[23]" value=" REX_VALUE[23] " />
        </div>
    </div>
</fieldset>

<fieldset class="form-horizontal off" id="row3">
    <legend>3. Zeile / Ereignis</legend>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_30">Uhrzeit</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_30" type="text" name="REX_INPUT_VALUE[30]" value="REX_VALUE[30]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_31">Ereignis</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_31" type="text" name="REX_INPUT_VALUE[31]" value="REX_VALUE[31]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_32">weitere Infos</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_32" type="text" name="REX_INPUT_VALUE[32]" value="REX_VALUE[32]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_33">interner Link</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_33" type="text" name="REX_INPUT_VALUE[33]" value="REX_VALUE[33]" />
        </div>
    </div>
</fieldset>

<fieldset class="form-horizontal off" id="row4">
    <legend>4. Zeile / Ereignis</legend>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_40">Uhrzeit</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_40" type="text" name="REX_INPUT_VALUE[40]" value="REX_VALUE[40]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_41">Ereignis</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_41" type="text" name="REX_INPUT_VALUE[41]" value="REX_VALUE[41]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_42">weitere Infos</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_42" type="text" name="REX_INPUT_VALUE[42]" value="REX_VALUE[42]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_43">interner Link</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_43" type="text" name="REX_INPUT_VALUE[43]" value="REX_VALUE[43]" />
        </div>
    </div>
</fieldset>

<fieldset class="form-horizontal off" id="row5">
    <legend>5. Zeile / Ereignis</legend>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_50">Uhrzeit</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_50" type="text" name="REX_INPUT_VALUE[50]" value="REX_VALUE[50]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_51">Ereignis</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_51" type="text" name="REX_INPUT_VALUE[51]" value="REX_VALUE[51]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_52">weitere Infos</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_52" type="text" name="REX_INPUT_VALUE[52]" value="REX_VALUE[52]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_53">interner Link</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_53" type="text" name="REX_INPUT_VALUE[53]" value="REX_VALUE[53]" />
        </div>
    </div>
</fieldset>

<fieldset class="form-horizontal off" id="row6">
    <legend>6. Zeile / Ereignis</legend>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_60">Uhrzeit</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_60" type="text" name="REX_INPUT_VALUE[60]" value="REX_VALUE[60]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_61">Ereignis</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_61" type="text" name="REX_INPUT_VALUE[61]" value="REX_VALUE[61]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_62">weitere Infos</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_62" type="text" name="REX_INPUT_VALUE[62]" value="REX_VALUE[62]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_63">interner Link</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_63" type="text" name="REX_INPUT_VALUE[63]" value="REX_VALUE[63]" />
        </div>
    </div>
</fieldset>

<fieldset class="form-horizontal off" id="row7">
    <legend>7. Zeile / Ereignis</legend>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_70">Uhrzeit</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_70" type="text" name="REX_INPUT_VALUE[70]" value="REX_VALUE[70]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_71">Ereignis</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_71" type="text" name="REX_INPUT_VALUE[71]" value="REX_VALUE[71]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_72">weitere Infos</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_72" type="text" name="REX_INPUT_VALUE[72]" value="REX_VALUE[72]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_73">interner Link</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_73" type="text" name="REX_INPUT_VALUE[73]" value="REX_VALUE[73]" />
        </div>
    </div>
</fieldset>

<fieldset class="form-horizontal off" id="row8">
    <legend>8. Zeile / Ereignis</legend>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_80">Uhrzeit</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_80" type="text" name="REX_INPUT_VALUE[80]" value="REX_VALUE[80]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_81">Ereignis</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_81" type="text" name="REX_INPUT_VALUE[81]" value="REX_VALUE[81]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_82">weitere Infos</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_82" type="text" name="REX_INPUT_VALUE[82]" value="REX_VALUE[82]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_83">interner Link</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_83" type="text" name="REX_INPUT_VALUE[83]" value="REX_VALUE[83]" />
        </div>
    </div>
</fieldset>

<fieldset class="form-horizontal off" id="row9">
    <legend>9. Zeile / Ereignis</legend>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_90">Uhrzeit</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_90" type="text" name="REX_INPUT_VALUE[90]" value="REX_VALUE[90]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_91">Ereignis</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_91" type="text" name="REX_INPUT_VALUE[91]" value="REX_VALUE[91]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_92">weitere Infos</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_92" type="text" name="REX_INPUT_VALUE[92]" value="REX_VALUE[92]" />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_93">interner Link</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_93" type="text" name="REX_INPUT_VALUE[93]" value="REX_VALUE[93]" />
        </div>
    </div>
</fieldset>
Führt dazu dass REX_VALUE[21] , REX_VALUE[22] und REX_VALUE[23] schon im Eingabefeld vorausgefüllt sind.
Kann mir wer helfen und sagen warum?

Gruß und Dank
Björn

Gort
Beiträge: 79
Registriert: 3. Aug 2006, 13:55

Re: Modul Eingabe Problem

18. Mär 2017, 13:28

Bin noch immer nicht kpl. mit Rex 5 vertraut, aber bis Rex 4 waren immer nur 20 values in einem Modul möglich.

Benutzeravatar
runstop64
Beiträge: 302
Registriert: 23. Okt 2012, 21:34
Wohnort: Hamburg
Kontaktdaten: Website Facebook Twitter

Re: Modul Eingabe Problem

18. Mär 2017, 13:36

Hi,
es sind immer noch nur max. 20 Variablen möglich. Du kannst jedoch mehrere Werte über Array-Schreibweise in eine Variable speichern:

Code: Alles auswählen

REX_VALUE[1][1]…REX_VALUE[1][2]…
in der Ausgabe löst du die Werte mit

Code: Alles auswählen

$var = rex_var::toArray("REX_VALUE[1]")
in ein Array auf.
Viele Grüße,
Daniel


studio-ahoi.de | Referenzen | Friends Of REDAXO

Björn Lindner
Beiträge: 56
Registriert: 30. Jan 2012, 12:53

Re: Modul Eingabe Problem

18. Mär 2017, 23:00

alles klar, vielen dank

Björn Lindner
Beiträge: 56
Registriert: 30. Jan 2012, 12:53

Re: Modul Eingabe Problem

18. Mär 2017, 23:38

hm jetzt wird mir im inputfeld [1] angezeigt wenn ich REX_VALUE[1][1] drin habe.

Code: Alles auswählen

    <div class="form-group">
        <label class="col-sm-2 control-label" for="markitup_20">Uhrzeit</label>
        <div class="col-sm-10">
			<input class="form-control" id="markitup_20" type="text" name="REX_INPUT_VALUE[2][1]" value=" REX_VALUE[2][1] " />
        </div>
    </div>

Zurück zu „Module/Aktionen [R5]“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 Gäste