minchars command


Author
Message
juju
juju
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)
Group: Forum Members
Posts: 26, Visits: 118

Hi,


I tried the minchars command in the textbox (I would like to allow the participants to go to the next page only if they write a certain number of characters) and I get the following message:

/minchars: is not a valid attribute.







 I am using the 3.0.4.0 version.


Any idea about why?


Thanks in advance


Juliette


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

Definitely a bug. '/ maxchars' and '/ minchars' attributes should be available for the <textbox> element as of 3.0.4.0, but alas (as you noted) the parser reports them as invalid attributes in both 3.0.4.0 and 3.0.5.0 (beta). Additionally, they're not mentioned in the documentation currently.


However, as a workaround, you should be able to implement the input constraint via use of regular expressions in the '/ mask' attribute. I can help you get this going if you provide the details.


Best wishes from a fellow Inquisit user,


~Dave


juju
juju
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)
Group: Forum Members
Posts: 26, Visits: 118

Thanks for the reply and the offer... and I accept it!!


Basically the participants are asked to write down a paragraph of at least 4 lines (we set up 4 lines minimum but  it can be easily converted in characters if needed). And I would like to be sure that they write at least those 4 lines and not only one word or one word for each line before they go to the next page. 


Below you find the starting point.


Thanks in advance for your help


I really appreciate


Best


Juliette



<surveypage Induction_d>


/caption="Leggi il profilo di Marco (18 anni) e prova a farti un'impressione.


Scrivi almeno 4 righe: quali potrebbero essere i suoi hobbies, la sua personalità e così via?"


/subcaption = "



Marco pensa che sia importante fare qualcosa per il futuro, anche se deve sacrificare qualcos'altro nel presente.


A Marco non piace buttare le cose, anche se sono rotte, ma preferisce ripararle.


Marco si definisce come uno che tiene conto della natura e la rispetta.


Marco cerca sempre di migliorare la sua qualità di vita.


Marco cerca spesso di agire in modo tale che le prossime generazioni abbiano un buon futuro."


/ fontstyle = ("Times New Roman", -24, true, false, false, false, 5)


/subcaptionfontstyle=("Times New Roman", -22, true, false, false, false, 5)


/ itemfontstyle = ("Times New Roman", -18, false, false, false, false, 5, 0)


/ questions = [1=Induction_d]


/ showquestionnumbers = false


/ showpagenumbers = false


</surveypage>



<textbox Induction_d>


/ textboxsize = (70,25)


/ multiline = true


/ fontstyle = ("Times New Roman", -20, true, false, false, false, 5)


/ subcaptionfontstyle = ("Times New Roman", -20, true, true, false, false, 5)


/position = (15,65)


/required =true


</textbox>





Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

Alright, thanks for the info. Give me a little while to figure this out...


~Dave


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

Okay, applying regular expressions to text input spanning multiple lines can be a bit tricky at times. In theory, it should be possible to check for the number of line breaks etc., but since I'm not entirely sure which exact "flavor" of RegEx engine Inquisit implements, here's a simpler approach akin to what you'd have done with '/ minchars':


<textbox Induction_d>
[...]
/ validresponse = (anyresponse)
/ mask = ^(\w|\s){25,}$
</textbox>


This particular RegEx basically checks whether subjects have entered 25 or more characters (including letters, digits and whitespaces). Hope this helps.


~Dave


juju
juju
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)
Group: Forum Members
Posts: 26, Visits: 118

Fantastic!


It works perfectly!


Without you I would have had to ask the participants to write it down on a piece of paper and then insert all the data by hand (we are aiming at 1000 participants...).


Thanks a lot for the very prompt and efficient solution.


Best,


Juliette


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K

Great! However, make sure you test this properly before collecting data. Maybe a more lenient RegEx would be even more suitable (e.g. '/ mask =
^.{25,}$'), which would also count interpunctuation characters etc.


Also note that my RegEx skills are a little rusty, so please do take my words with a grain of salt!


~Dave


juju
juju
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)
Group: Forum Members
Posts: 26, Visits: 118

The last expression you sent is working better. WIth the first one, I had to make lines of letters without punctuation!


And BTW, your RegEx skills are better than mine (I had to check for the meaning the first time!)


Thanks again


Juliette


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search