[ic] Form Value Submit Problem
ic at 3edge.com
ic at 3edge.com
Thu Sep 7 08:57:21 EDT 2006
Postfix User writes:
> On 9/7/06, ic at 3edge.com <ic at 3edge.com> wrote:
>> Postfix User writes:
>> > Hi,
>> > Using Interchange 5.4.0 on CentOS.
>> > I have a weird form submit problem that I cant track down... Maybe
>> > someone can help.
>> > I have written a custom user tag to calculate shipping for a specific
>> > saved cart at checkout, allowing a user to select different shipping
>> > methods for different carts.
>> > <FORM ACTION="[process secure=1]" METHOD="POST">
>> > <input type=hidden NAME=mv_doit value=refresh>
>> > <input type=hidden NAME=mv_nextpage value="ord/checkout">
>> > <input type=hidden name=mv_check value="Save_database">
>> > <INPUT TYPE=hidden NAME="mv_order_profile" VALUE="credit_card">
>> > [loop list="abc xyz"]
>> > Select Shipping Method:
>> > <SELECT NAME="[loop-code]_ship" onChange="checkout.submit()" SIZE="1">
>> > [ship_order_cost cart="[loop-code]"]
>> > </SELECT>
>> > [/loop]
>> > </FORM>
>> > The [ship_order_cost] global UserTag that I have written is functional
>> > as it correctly generates the shipping cost for each cart and
>> > populates the select menu with the proper data.
>> > The problem that I am having is that when this generates the actual
>> > HTML, it allows me to submit both of the select menus, however, only
>> > the first select menu (abc_ship) saves. The second menu (xyz_ship)
>> > does not save or update its value in the users session.
>> > Accordingly, I did a [dump values] to see if there is even an entry
>> > for xyz_ship saved to the session and there is not.
>> > Does anyone have any pointers to assist with why it is saving one but
>> > not the others information?
>> > Thanks!
>> What do you see when you do a 'view source' of the page?
> I see exactly what is supposed to be there for generated HTML code.
> It is just not recognizing the saved / updated values when the form is
> submitted on the second select menu.
But as you do a onChange="checkout.submit()" it is only possible to set 1 of
the shipping methods, as it will submit the page the moment you touch one of
the 2 selects (xyz or abc) ... Of course I'm having limited info here, but
if you say that people can select different shipping methods for different
carts and I assume the xyz and abc are related to carts then there is only 1
that will be taken .. I'd probably help if you would c&p the HTML snippet
here as there might lie the problem which you're overlooking ...
More information about the interchange-users