Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Compiler Error wegen [

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
mjimmy
Smarty Rookie


Joined: 07 Dec 2011
Posts: 8

PostPosted: Sat Mar 01, 2014 9:40 pm    Post subject: Compiler Error wegen [ Reply with quote

Bei mir funktioniert das hier nicht:
{html_options name=Geraet[$k1] options=$options[$k1] selected=$i1}
genauso wenig wie
{html_options name=Geraet.$k1 options=$options.$k1 selected=$i1}

Hat mir jemand eine Idee, der Fehler lautet:

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/www/htdocs/w011aa00//smarty/templates/0rapport_newi.tpl" on line 134 "{html_options name=Geraet[$k1] options=$options[$k1] selected=$i1}" - Unexpected "[", expected one of: "}" <-- thrown in /www/htdocs/w011aa00/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 134
Back to top
View user's profile Send private message
pvdb
Smarty Rookie


Joined: 07 Mar 2014
Posts: 6

PostPosted: Fri Mar 07, 2014 2:26 pm    Post subject: Reply with quote

Hi,

versuch mal dies hier:

{html_options name=$Geraet.k1 options=$options.k1 selected=$i1}

Immer nur vorne das $ nutzen.
Back to top
View user's profile Send private message
mjimmy
Smarty Rookie


Joined: 07 Dec 2011
Posts: 8

PostPosted: Sun Mar 16, 2014 7:15 am    Post subject: Reply with quote

Ich schreib mal mehr von meinem Quelltext, damit sich das Problem klarer darstellt:
<h2>Geräte Grunddaten: &raquo Geräte-Daten:{html_checkboxes name='wup' options=$val_cb selected=$wup }</h2>
<table cellpadding=2 cellspacing=0 width=980>
{foreach name=wauftrag1 from=$wauftrag.0 item=i1 key=k1}
{if $k1|in_array:$show1}
<input type="hidden" name=Geraet[{$k1}] value="{$i1}" size="80">

{elseif $k1|in_array:$show_sel1}
<tr bgcolor="silver">
<td>
{$smarty.foreach.wauftrag1.iteration}. {$k1|capitalize}
</td><td>
{html_options name=Geraet['$k1'] options=$options['$k1'] selected=$i1}
</td>
</tr>

{else}
<tr bgcolor="silver">

<td>
{$smarty.foreach.wauftrag1.iteration}. {$k1|capitalize}
</td>
<td>
<input type="text" name="Geraet[{$k1}]" value="{$i1}" size="106">
</td>
<tr>
{/if}
{/foreach}
</table>
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP