Code Monkey home page Code Monkey logo

Comments (5)

etosch avatar etosch commented on July 20, 2024

So, for freetext, I had the following rules:

  • 0, 1, true, false == booleans
  • text beginning with # is a regex (e.g. #{0-9*}, modelled after clojure's regex syntax)
  • all other text is a string and simply appears as the default text.

The interpreter checks to see if the input matches "#{.*}". If it does, it strips out those tokens and creates a regex object and only allows the user to continue from their current point in the survey if they match the regex. Clearly here we don't need to worry about that -- I would say, if the user chooses to make the question freetext, expand that dialogue box to ask if they want to provide default text or a regex.

Regarding the options field: this used to be just a boolean. However, I wanted to get away from ids having semantic importance, since previously I used the option id in order to determine the original ordering of the options (for when their ordering matters). The array of ids stores the ordering explicitly. So, if a user toggles the button that says that ordering matters, just extract the ids of those options and store them in an array -- the user shouldn't be aware of what's going on at all.

from react-surveyman.

prakhar1989 avatar prakhar1989 commented on July 20, 2024

if the user chooses to make the question freetext, expand that dialogue box to ask if they want to provide default text or a regex.

Sounds good. I'll see how I can add this.

So, if a user toggles the button that says that ordering matters, just extract the ids of those options and store them in an array

Isn't the order in the options array already indicative of the ordering? Currently, each question treats ordering just as a boolean property. Should I have array to depict the ordering?

Lastly what about answer and correlation. permitBreakoff is simple since it's just a boolean. What helptext should I add for permitBreakoff?

from react-surveyman.

etosch avatar etosch commented on July 20, 2024

Isn't the order in the options array already indicative of the
ordering? Currently, each question treats ordering as a just a boolean
property. Should I have array to depict the ordering?

It could be; I don't make that guarantee going from csv->java->json, but
there is no reason why you couldn't.

Lastly what about answer and correlation. permitBreakoff is simple
since it's just a boolean. What helptext should I add for
permitBreakoff?

Don't worry about them. Answer is old, from when we were thinking about
rolling this in with some experimental setups. Also, we will eventually
deprecate manually setting breakoff -- this is something that should be
dynamically determined by the runtime.

from react-surveyman.

prakhar1989 avatar prakhar1989 commented on July 20, 2024

Great - so I just need to allow users to provide a default text when they enable freetext, right?

from react-surveyman.

etosch avatar etosch commented on July 20, 2024

default text, or give them the option of entering a regular
expression, yes.

  Emma Tosch
  [email protected]

On Tue, Jul 14, 2015, at 10:50 PM, Prakhar Srivastav wrote:

Great - so I just need to allow users to provide a default text when they enable freetext, right?


Reply to this email directly or view it on GitHub[1].

Links:

  1. #33 (comment)

from react-surveyman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.