Loading ...
Sorry, an error occurred while loading the content.
 

Re: [NH] code for form

Expand Messages
  • Stephen Riddle
    ... That depends on the cgi script. However, the only thing allowed in an option tag is text. No html elements, no other form elements, no nothing except just
    Message 1 of 4 , Nov 2, 2000
      Mette wrote:

      > Heisan! Any Note Tabers that can help me out?
      >
      > I am working on html code for a shoppingcart called qcart . Is it possible
      > to add <input type=text> in the middle of this form with select and option
      > tags? And still have the cart figure out the price and display all the input
      > from the form. I am unsucessfull so far.
      >

      That depends on the cgi script.
      However, the only thing allowed in an option tag is text. No html elements, no
      other form elements, no nothing except just plain words. That's why Tidy
      changes everything to character references.
      You can put another input element after the select element or before it, but not
      in it.
      Looking at the code you sent it is kind of hard to figure out exactly what is
      supposed to be happening.
      My best guess is that your form actually sends the script html code.
      (non-standard code at that as for every li tag there is supposed to be a /li
      tag, but we don't need to confuse the issue.) If this is so, don't try to parse
      it with Tidy, unless qcart lets you know character references are ok.

      >
      >
      > The <br> <li> code is given from the qcart provider. Every time I run
      > Tidy HTML on this code it changes it to <BR><LI>. What does it
      > means for my page if I keep <br> <li>?
      >

      Within the option element, the <br><li> is meaningless, as each line of the drop
      down list can not contain another line. The break before the <li> is not
      necessary unless you want double space instead of single spacing, as the list
      item automatically starts with a line break.

      >
      > I am new in this game even though I have been on the list and tried to
      > follow the discussions. I hope my questions is not too far off the topics
      > covered here. Please bear over with me!

      This is an e-groups dedicated to html, and I hope I help.
      Keep pluggin and eventyally you'll do this in your sleep. (yeah, right!)
      Good luck
      Stepne
    • Bill Scott
      Hi Lotta: you should be able to use any of the normal form tags inside your form here is a sample of my cartmanager software .... the way set your options are
      Message 2 of 4 , Nov 3, 2000
        Hi Lotta:
        you should be able to use any of the normal form tags inside your
        form here is a sample of my cartmanager software .... the way set
        your options are between the Pipe | symbol so the
        first |customer|discription|price| etc etc ... what goes between
        the pipes might vary for each
        cart system but my guess is they are probably all using a canned
        cgi .... for processing forms. it looks very similar to my first
        cart which was free ...

        here is an example from my shopping cart system ....


        <form method=POST
        action="http://www.cartmanager.net/cgi-bin/cart.cgi">
        <input type=hidden name=AddItem
        value="customer number|Nylon Landyards
        w/swivel|4.45|VARQuantity|0042|||||">
        <input type=text name=VARQuantity size=4 value="1">
        <input type=image
        src="http://www.stockdogsaction.com/OTHER/add.gif"><BR>

        <select name="VARcost">
        <option value="red">red</option>
        <option value="yellow">yellow</option>
        <option value="Navy">Navy</option>
        <option value="Green">Green</option>
        <option value="white">white</option>


        </select></form>

        We now have online interactive chat on our web site .... !

        Bill

        Border Collies N Stuff

        http://www.stockdogsaction.com/OTHER/index.html
      • Stephen Riddle
        Hi Mette, ... I have not done CGI either, but I went to the Qcart web page. ... . . . ... I see what you are doing now with the variable names above. They are
        Message 3 of 4 , Nov 4, 2000
          Hi Mette,

          Mette wrote:

          > Heisan Lotta! and hello Bill and Stephen!
          >
          > I have been reading those CGI scripts up and down since I never saw a CGI
          > script in my life before. I finally got it to work somehow.

          I have not done CGI either, but I went to the Qcart web page.


          > I bought this
          > package, and found out that the 24 hour support did not include anything on
          > how to do this code. That belongs to Premium support department @ $100 or
          > 175
          > per hour. I don't remember, and I can't afford either.

          .
          .
          .

          > The rest of my multiple
          > choice menus are all linked together in this way, the first pull down menu
          > reflects the variable VARFrill1 from the form:
          >
          > <select name="VARFrill1">
          > <option value="Number of letters:1<br><li>VARFrill2">1</option>
          > <option value="Number of letters:2<br><li>VARFrill2">2</option>
          > </select>
          > <select name="VARFrill2">
          > <option value="Text style:Block<br><li>Varfrill3">Block</option>
          > <option value="Text style:Outline<br><li>Varfrill3">Outline</option>
          > </select>
          > <select name="VARFrill3">
          > <option value="Mat color: Red<br><li>VARFrill4">Red</option>
          > </select>

          I see what you are doing now with the variable names above. They are located
          inside quote marks and that makes it acceptable. I suspect it might be better
          using the character references, e.g. "Mat color: Red<br><li>. . ." but if
          it works, don't break it.
          .
          .
          .

          >
          > Stephen how do I find out if the cgi script allow the text box in the middle
          > of the form full of multiple choice drop down menus? Thanks for your advice
          > and I am happy I found the right list. I was sending it to the clip group
          > first, not realizing there were 2 different e-mails.

          According to how I understand Qcart's page, they do not want you to use text
          boxes.
          They have sample html code, and it is all for drop down lists.
          You, if you know what you are doing, could probably re-write the form to make
          text boxes
          work, but you would need to have a validator, that is some kind of script to
          make sure that what the customer enters is something you actually sell. For
          instance instead of "Mat color:Red", if you did not have some kind of validation
          system, the customer might make up a color: "Mat color:Burgandy and Pink Plaid".

          Apparently, though, you can have any number of forms on your page linking to
          Qcart. I could not figure out their pricing scheme, and the html coding of
          numerous choices for a catalogue is pretty tedious, but breaking down the
          choices into discrete option lists is probably a good idea.
          You could write a form linked to a JavaScript which fills in the customer's
          order for you and sends that to Qcart, but I am not quite sure if that would
          save you time and am not sure (without a lot of hard thinking) on where or how
          you would begin to do it.
          You might have the customer fill out two forms, one to be sent to Qcart, and one
          to you. The one to you containing specific order information filled out with a
          text box (making sure you can phone, e-mail or write the customer to clear up
          any confusion, and the other going to Qcart with billing information.
          Face to Face stores do this, sending one set of information to accounting
          departments, and another set to the folks who actually get the goods to whomever
          needs them.
          I hope this helps.
          Good Luck,
          Stephen
        • Lotta
          Hi all, Mette, I reread your first post and am wondering if you are asking if you can mix option fields and text fields on your WEB PAGE? That you can do. As
          Message 4 of 4 , Nov 4, 2000
            Hi all,

            Mette, I reread your first post and am wondering if you are asking if you
            can mix option fields and text fields on your WEB PAGE? That you can do. As
            Stephen said, the only elements SELECT can contain are OPTION and OPTGROUP.
            But you can mix the fields on the page by closing the Select Element before
            putting a text field in.

            Something like the following is perfectly OK. If your script can handle the
            free user input is another matter and above me.

            <SELECT>
            <OPTION></OPTION>
            <OPTION></OPTION>
            </SELECT>

            <INPUT type="text">

            <SELECT>
            <OPTION></OPTION>
            <OPTION></OPTION>
            </SELECT>

            And so on...Well, at least we are trying :)

            Lotta
          Your message has been successfully submitted and would be delivered to recipients shortly.