Hi,
In my application [testing tool] I want to display dynamically multiple dropdown items in a question.
I explain:
The question itself is stored in the database like:
"On the picture above you see the <tag> which was built in the year <tag>."
In another table of my database I store the information which will replace the '<tag>' sign, because I can easyly do a "REReplace". Now, it works fine for e.g. a text input field. But I want more ;-)
Saying: I want to replace the first "<tag>" he finds with info stored in my table T_MultipleDropdown. The table looks like:
First record:
--------------------
QuestionID = 44
Place = 1 [indiciates the place of the <tag> in the question]
Value1 = Porsche
Value2 = Mustang
Value3= Chevrolet
Second record:
--------------------
QuestionID = 44
Place = 2 [indiciates the place of the <tag> in the question]
Value1 = 1971
Value2 = 1974
Value3= 1975
Now, the result should be:
"On the picture above you see the Porsche/Mustang/Chevrolet which was built in the year 1971/1974/1975."
Where the options should be like:
<select name dropdown=1><option value=1>Porsche<option value=2>Mustang<option value=3>Chevrolet</select>
<select name dropdown=2><option value=1>1971<option value=2>1974<option value=3>1975</select>
I manage to replace the "<tag>" signs with this code:
#REReplace("#Question#","<tag>","<select name=optie><option>1<option>2</select>","ALL"
#
The result is that i only get to see:
OR: all the same content in each 'dropdowner'
OR: The question repeats itself 3 times...
I hope this was/is clear and someone can help me out on this.
With kind regards
Bram
In my application [testing tool] I want to display dynamically multiple dropdown items in a question.
I explain:
The question itself is stored in the database like:
"On the picture above you see the <tag> which was built in the year <tag>."
In another table of my database I store the information which will replace the '<tag>' sign, because I can easyly do a "REReplace". Now, it works fine for e.g. a text input field. But I want more ;-)
Saying: I want to replace the first "<tag>" he finds with info stored in my table T_MultipleDropdown. The table looks like:
First record:
--------------------
QuestionID = 44
Place = 1 [indiciates the place of the <tag> in the question]
Value1 = Porsche
Value2 = Mustang
Value3= Chevrolet
Second record:
--------------------
QuestionID = 44
Place = 2 [indiciates the place of the <tag> in the question]
Value1 = 1971
Value2 = 1974
Value3= 1975
Now, the result should be:
"On the picture above you see the Porsche/Mustang/Chevrolet which was built in the year 1971/1974/1975."
Where the options should be like:
<select name dropdown=1><option value=1>Porsche<option value=2>Mustang<option value=3>Chevrolet</select>
<select name dropdown=2><option value=1>1971<option value=2>1974<option value=3>1975</select>
I manage to replace the "<tag>" signs with this code:
#REReplace("#Question#","<tag>","<select name=optie><option>1<option>2</select>","ALL"
The result is that i only get to see:
OR: all the same content in each 'dropdowner'
OR: The question repeats itself 3 times...
I hope this was/is clear and someone can help me out on this.
With kind regards
Bram