Announcement

Collapse
No announcement yet.

Delivering HTML textarea input with order

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

    Delivering HTML textarea input with order

    On a greeting card website I work on, we are looking to offer personalised cards as well as blank cards. Each product page will have two tabs to switch between the two card types, with an add to cart button on each tab. I am working on a prototype design where the personalised tab contains two HTML <textarea> boxes allowing the user to input their own custom text.

    Is there any additional code I can use on the personalised tab's add to cart button which will save the contents of the textboxes so that when the order comes through, we also get this text through?

    An alternative I've thought of is to have a 'save' button below the text boxes, which when clicked will email the custom text to us via a PHP script and tell the user to then click add to cart. However it would be excellent if this can all be done concisely just with the buy button, and for the custom text to come through at the same time as the order as opposed to 10 minutes earlier as things may get confusing!

    Many thanks in advance.
    Adapt Design & Advertising
    www.adaptdesign.com

    Cardoons.co.uk - Cards With An Inflated Personality
    www.cardoons.co.uk

    #2
    Knowledge Base - How do I allow a larger area for customers to fill in the 'Other Info' prompt online? - may be useful.

    And http://community.actinic.com/showthread.php?t=50863 shows how to make said textarea optional.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      And if you must have two textareas, make the first the Actinic Other Info compatible one. Then use some JavaScript to append the contents of the second textarea to the first (plus some delimiter text) before the form is submitted.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thank you for your responses. Two textbox areas are essential for most products but only one is required on others, so I'm hoping that I can toggle the number of textboxes that appear via variables depending on what product the user is looking at. I hope both boxes can be optional, so if the user doesn't enter anything they effectively order a standard blank card? The price is the same for either type of card.

        Making the adjustments to the 'Other Info' prompt sounds fine, and what you have suggested makes sense, just to clarify are you suggesting along these lines:

        1. User types text into both boxes
        2. User clicks Add to Cart
        3. A JS function is run to add a delimiter (eg " -- ") into the beginning of the second box, and then all of the second box's content is copied and pasted into the 'Other Info' box
        4. The browser runs the 'add to cart' link

        Then, would the full contents of 'Other Info' appear on the checkout using the steps in your first link?

        This sounds great but both text boxes have character limits and number of line limits, so that the user doesn't add text that would overflow out of the preview graphic. Therefore copying from box two into 'Other Info' will cause an issue with character limit.

        Is it feasible to make 'Other Info' invisible or display it off the page, and then to have textbox1 contents + textbox2 contents paste into 'Other Info' upon clicking the add to cart button?
        Adapt Design & Advertising
        www.adaptdesign.com

        Cardoons.co.uk - Cards With An Inflated Personality
        www.cardoons.co.uk

        Comment


          #5
          Textarea fields do not have any limits on the number of characters entered. The cols and rows attributes only define the size of the box that appears on-screen.

          If you say "both text boxes have character limits and number of line limits" then that will have to be enforced by code that you write.

          The Other Info prompt textarea can have attribute style="display:none" added to it to make it invisible.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Sorry I probably didn't phrase that very well - in my prototype, I have used jQuery to limit the boxes with a character count, and I have limited the number of lines to 5.

            This sounds promising - just to clarify by using style="display:none" will the Other Info field still work as an area to pass the text through, despite not appearing on the page?

            Is there a way I can change 'Other Info' on the checkout page to appear as 'Personalised Text'?
            Adapt Design & Advertising
            www.adaptdesign.com

            Cardoons.co.uk - Cards With An Inflated Personality
            www.cardoons.co.uk

            Comment


              #7
              You can still manipulate the Other Info textarea and pass it to the cart if its display is none.

              Cart text: Not sure what you're after. The default prompt in the Cart is your Other Info question so it can be what you want.

              Maybe in Design / Text / try Search.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Fantastic, just what I needed to know. Thanks so much for helping me out with this today
                Adapt Design & Advertising
                www.adaptdesign.com

                Cardoons.co.uk - Cards With An Inflated Personality
                www.cardoons.co.uk

                Comment

                Working...
                X