Announcement

Collapse
No announcement yet.

Form With If Functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Form With If Functions

    Hi,

    this is my first thread so apologies if i do not provide enough information

    I would like to create a questionnaire style form that can calculate a score based on an individuals answers.

    I anticipate the form having simple questions with only yes or no anwsers. I was thinking of using tick boxes for yes or no anwsers but whatever works wld be fine.

    Eg. do you own a car? then the user either clicks on the yes box or the no box

    I would like around 10 questions and each questions answer to have a score of 1

    Then after answering the ten questions the user can be given a score eg. 7

    I know how to do this in excel using IF functions but when I inserted the table in BV i could not edit any values when previewing so i presume this will not work if i publish.

    I would like to know how to achieve the above as simply as possible any help would be great, thanks

  • #2
    Re: Form With If Functions

    There are ways of transforming an excel form so that it will preserve the functions (they are converted in Javascript functions). See http://www.dbtechnosystems.com/formaexcel1.html where the form is updated realtime.

    However, if you don't mind refreshing the page, it can also be done using a simple php script that will receive the form values, and it will simply add the values received. To do it easily, Radio buttons should be used instead of checkboxes, with a value of "1" assigned to the radio button corresponding to the "Yes" and a value of "0" assigned to the radio buttons corresponding to he "No".
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment


    • #3
      Re: Form With If Functions

      Thanks very much for your help, navaldesign. Refreshing the page is not a problem, so I have made a trail form with the radio buttons assigned the values to the yes and no. I have no clue how to use php and I have been searching the internet on how to create the code that I need. I presume that it is quite a stragithforward one as its only adding. If you could point me in the right direction that would be a massive help, thanks.

      Comment


      • #4
        Re: Form With If Functions

        Please post a link to the form and i will see what i can do
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment


        • #5
          Re: Form With If Functions

          hi, thanks, I have put a form up at www.homecure.co.uk/form.html I intend to make a health questionnaire from which people can answer a lot of questions and then have a score, but it is identical format to the one on the page just different text and more questions. Cheers for your help.

          Comment


          • #6
            Re: Form With If Functions

            Start changing your radio buttons Group names. Each pair of radio buttons must have the same Group name. The one corresponding to "Yes" will have value 1, the others, corresponding to "No" will have value 0.

            However, this is not absolute, because it depends on the nature of the questions. In the example you have posted, one f the questions (Are you overweight ?) should (in my opinion) have opposite effect (Yes = 0 No = 1)

            Anyway, please let me know if you need to display the result in a new page or have it emailed to you, so i can fix it.

            Also, let me know if you want simply displayed the result of the "Yes" addition or you want the result of the "Yes" minus "No"s.
            Navaldesign
            Logger Lite: Low Cost, Customizable, multifeatured Login script
            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

            Comment


            • #7
              Re: Form With If Functions

              Ok, have changed radio buttons to now 2 groups Yes and No with the values 1 and 0 respectively. It is a good point you make about the overweight question so I have rephrased it.
              I would like the results to display on the same page so that when they click submit they can see the score straight away.
              If the answer could be displayed as just a total but it is worked out by adding the yes's and taking away the no's that would be great because then I could have flexibility to assign different value to yes's and no's if needs be. Thanks very much.

              Comment


              • #8
                Re: Form With If Functions

                Have a look at http://www.dbtechnosystems.com/Tips/score1.php

                If that's what you want, contact me through the form in my site and i will send you the file.
                Navaldesign
                Logger Lite: Low Cost, Customizable, multifeatured Login script
                Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                Comment


                • #9
                  Re: Form With If Functions

                  Yes, thats absolutely fantastic thanks, exactly what I was looking for, thanks for all your help, have contacted you through form

                  Comment

                  Working...
                  X