episphere / quest

experimenting with the idea of a questionnaire markup
https://episphere.github.io/quest/
2 stars 11 forks source link

State not getting displayed in followup question only in HOMEADD2_2 #343

Closed joshid-ims closed 3 years ago

joshid-ims commented 3 years ago

State value if entered in HOMEADD1_2, is not getting displayed in HOMEADD2_2. It works for all other questions. The code is same for other questions. So could it be a renderer issue?

joshid-ims commented 3 years ago

[HOMEADD1_2?] What is the full street address of the place you lived before you moved to the place you live now? Please only include addresses where you have lived for <b>at least two years</b>.

Street number |__|__|id=STNUM1 min=0 max=999999|
Full Street name |__|id=FULLST1|
Apartment, suite, unit, building, etc. |__|__|id=APT1|
City |__|id=CITY1|
State/Province |__|id=ST1|
Zip code |__|__|id=ZIP1 min=0|
Country |__|id=COUNTRY1|

[HOMEADD2_2?,displayif=or(or(isNotDefined(CITY1,false),isNotDefined(ST1,false)),or(isNotDefined(ZIP1,false),isNotDefined(COUNTRY1,false)))] Please provide the following information:
City: |displayif=exists("CITY1")|{$CITY1}|
|__|id=CITY1_FOLLOWUP displayif=doesNotExist("CITY1")|

State/Province: |displayif=exists("ST1")| {$ST1}|
|__|id=ST1_FOLLOWUP displayif=doesNotExist("ST1")|

Zip code: |displayif=exists("ZIP1") | {$ZIP1}|
|__|id=ZIP1_FOLLOWUP min=0 displayif=doesNotExist("ZIP1")|

Country: |displayif=exists("COUNTRY1")| {$COUNTRY1}|
|__|id=COUNTRY1_FOLLOWUP displayif=doesNotExist("COUNTRY1")|
(77) Don't know
danielruss commented 3 years ago

In order to get your example working, you need to add a question to the end..

[END] all done

now it works as expected. I'll try with the entire module 4.

joshid-ims commented 3 years ago

Yes, but we are not testing only this question separately. Testing all of Module 4 markup.

joshid-ims commented 3 years ago

Found the issue and fixed it.