Announcement

Collapse
No announcement yet.

Turning a user defined field into a checkbox

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

    Turning a user defined field into a checkbox

    I've been trying to change the General User Definable field in the general information checkout area after reading http://community.actinic.com/archive...p/t-15027.html.

    I know that thread was written for v7 and I'm using v9. However, what I did was go to the design tab and click on the field. I then changed the layout and it all looks fine.

    One small problem, the value doesn't find its way into the order details when someone checks the box.

    I changed the tag to this:

    <input type="checkbox" value="SubscribeToNewsletter" name="<actinic:variable name="GeneralUserDefined" />" CHECKED/>

    I gather the result should find its way into the comments area of the order.

    Can anyone see anything stupid I've done here apart from working on the first sunny sunday afternoon since easter?

    Thanks

    Bob

    #2
    The CHECKED part looks wrong and is not doing anything it looks to me.

    Comment


      #3
      The 'checked' part initialises the checkbox to checked as opposed to unchecked.

      Comment


        #4
        Originally posted by bookworm View Post
        The 'checked' part initialises the checkbox to checked as opposed to unchecked.
        I've only ever seen checked="checked", but you do seem to know more than me on this particular subject, so i will bow down gracefully and wish you good luck solving your problem.

        Comment


          #5
          Actually checked="checked" and just 'checked' on its own are correct. I changed it to checked="checked" and it initialised the box to checked but the value still got lost.

          Comment


            #6
            Did you test that the User Defined Field appeared in the order details before you changed it to be a checkbox? If not then I would suggest reverting to defaults and trying that first to determine where the problems lies.

            Comment


              #7
              Actinic V8 / V9 uses
              Code:
                    <input type="text" name="GENERALUSERDEFINED" size="40" maxlength="255" value="<Actinic:Variable Name="GeneralUserDefined"/>" />
              If I change this to
              Code:
                    <input type="checkbox" checked name="GENERALUSERDEFINED" value="SubscribeToNewsletter" />
              then it works fine.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Fantastic, it works, thanks!

                Only difference was that I inserted the actinic variable into the name instead of just typing in the name of the field.

                We're going live tomorrow so I was getting a bit twitchy!

                Bob

                Comment


                  #9
                  Originally posted by bookworm View Post
                  Actually checked="checked" and just 'checked' on its own are correct. I changed it to checked="checked" and it initialised the box to checked but the value still got lost.
                  I'm guessing this is an xhtml versus html difference then and i'm quoting xhtml.

                  Comment


                    #10
                    I am having the same problem.

                    I want to make General Information - User Defineable 3 into a checkbox.

                    I have followed the instructions in the KB and tried umpteen variants as above.

                    The checkbox appears OK, but the correct value does not transfer to the order. The order displays a positive value (ie the box is checked) whether or not the box actually has been checked.

                    The same thing happens in the MOTO form.
                    Lisa
                    www.alanaecology.com

                    Comment


                      #11
                      Miracle of miracles, I have now got it to work.

                      The working line reads

                      <input type="checkbox" name="GENERALUSERDEFINED" checked="CHECKED" value="Yes" />
                      Lisa
                      www.alanaecology.com

                      Comment

                      Working...
                      X