Reply To: Filled TextInput

PennController for IBEX Forums Support Filled TextInput Reply To: Filled TextInput

#6774
kathy
Participant

Hi Jeremy,

sorry to bother you again – I added a few options (a drop-down and a text input) to this page and now I get error messages for “job” and “country” (TextInput) even if correctly filled out, which prevent me from continuing. I’m guessing I’ll have to rearrange the order of the code, but I’m not sure how:

 newButton("okay", "Weiter")
        .print()
        .wait(
            // job
            getDropDown("job").test.selected()
                .failure( newText('errorjob', "Bitte gib Deine Hauptbeschäftigung an.").color("red").print() )
            // age
            .and( getTextInput("age").test.text(/^\d+$/)
                    .failure( newText('errorage', "Bitte gib Dein Alter an.").color("red").print() )
            // sex
            ).and( getDropDown("sex").test.selected()
                    .failure( newText('errorsex', "Bitte gib Dein Geschlecht an.").color("red").print() )
            // mother tongue
            ).and( getDropDown("german").test.selected()
                    .failure( newText('errorgerman', "Bitte gib an, ob Deutsch Deine Muttersprache ist.").color("red").print() )
            // bilingualism
            ).and( getDropDown("bilingual").test.selected()
                    .failure( newText('errorbilingual', "Bitte gib an, ob Du bilingual aufgewachsen bist.").color("red").print() )
            // nationality
            ).and( getDropDown("nationality").test.selected()
                    .failure( newText('errornationality', "Bitte gib Deine Nationalität an.").color("red").print() )
            // education
            ).and( getDropDown("bildung") .test.selected()
                    .failure( newText('errorbildung', "Bitte gib Deinen Bildungsstand an.").color("red").print() )
             // country
            ).and( getTextInput("country").test.text()
                    .failure( newText('errorcountry', "Bitte gib an, in welchem Land Du in letzten 5 Jahren gewohnt hast.").color("red").print() )
            )
        )      

Any chance you could have another look? Thanks a lot!

Best,
Kathy