I am trying to create a form that will allow three "submit" buttons to function within it, each posting to a different .php file. Normally I would just have a different form for each submit button (obviously), but I am trying to get all of the buttons in one table within the form so that I can evade a major design flaw that occurs when you have forms within the cells of tables (or rather, the flaw is most noticeable when forms are inside cells of a table).

Obviously this is not worth a major sacrifice in terms of restructuring my files and so on, but if anybody can tell me how to pull this off or offer a solution for getting rid of the space that browsers display at the end of a form, I'd be greatly appreciative!

Thanks!

    personally... id create 3 forms.. then create your table and paste the code in where you want it... i am not sure if you can even have more than one action in a form.. sounds to me like you are taking something that is easily done.. and making it a hassle...

      I'd agree, except that aesthetically I have encountered a really annoying problem. When you have a complete form in a website, the browser inserts an amount of space at the end of the form. Thus, if I put a form into the cell of a table that fits to my form, I get an unwanted space underneath the form within the cell.

      It is roughly like so:


      |xx[drop menu]xx[Go]xx|

      |xxxxxxxxxxxxxxxxxxxxxx|

      and I would like to to look more like this:


      |xx[drop menu]xxx[Go]xx|

      So far as I can figure, this needs to be done by putting the whole table within one form and having no forms within the table. Either that, or some really wicked .css editing, which would also be an option for this page.

      Thanks!

        haha.. yea.. css was my next suggestion.. ive never had the extra space problem though.. im sure next time i sit down to do something, i will have it 🙂

        happy coding

        rAdIo

          I figured out a way around my problem. I can put the form tags outside of the table cell tags but within the table tags. It is a goofy way to cheat the system, but as long as everything is stacked correctly, it works fine! Wheeee. So, put a whole td or tr within each form. Cool.

            The other solution would have been to give the three submit buttons different names, and then in the processing page see which one was clicked, and then run (possibly via an include()) the appropriate script.

              I am going to go learn about include() now because that sounds pretty handy for another time. Nice avatar!

                Write a Reply...