[TYPO3] TS-problem: add dynamic id to params.select
Christopher Torgalson
bedlamhotel at gmail.com
Sat Aug 2 19:28:02 CEST 2008
Bert Hiddink wrote:
> Hello,
>
> Please have a look a this TS-snippet:
> ...
> 20 = FORM
> 20.layout = <div style="margin: 3px;"> ###FIELD### </div>
> 20.params.select = id="combo_0" onChange="change(this);"
> 20.data (
> radius | {field:map_id}_radius=select | 10=10, 25=25, 50=50
> unit | {field:map_id}_kilometers=select | *miles=0, kilometers=1
> city | {field:map_id}_city=select | *San Jose=San Jose, Bbbb, bbb
> | {field:map_id}_submit=submit | Submit
> )
> 20.data.insertData = 1
> 20.no_cache = 1
> 20.noValueInsert = 0
>
> This works just fine except that the 'id="combo_0"' should be dynamic
> for every new select (id="combo_0", id="combo_1", id="combo_2",...)
>
> How could I achieve this? Is there a kind of "count"-variable available?
>
> Many thanks in advance for your ideas!!!!
If you make sure that "20.accessibility" and "20.dontMd5FieldNames" are
both set to 1, you should have predictable id attributes on all form
elements.
There is, as far as I know, no way to dynamically 'count' inside
20.params.select (since .stdWrap is not available, and it's not
processed like TEMPLATE cObjects). Possibly some of the more advanced
form extensions have features that would be of use to you…
--
Christopher Torgalson / bedlamhotel at gmail.com
More information about the TYPO3-english
mailing list