Mailing List Archive

Value not updating
Hello all,
 
I am having some trouble with a <select> HTML tag on one of my pages. I have a form that is supposed to get information from the <select> options before submitting.


<FORM ACTION="[area commerce]" METHOD="POST" name=payment>
...
<input type="hidden" name="cc_code" value="[value account_code]">
...
<select name=account_code tabindex="25001">
<option value="">-</option>
[cards]
<option value=[card-param code] [if-card-param !token] disabled="disabled"[/if-card-param]>[card-param reference]</option>
[/cards]
</select>


[cards] in this instance refers to the list of cards resulting from a query based on the customer ID.

My issue stems from the "account_code" value. From my understanding, the value of the <select> field should be updating based on which option is being selected. However, when I submit the form, the value being passed through "cc_code" is the value found on page load, not the one selected through the <option>. In other words, selecting an option does not change or update the value of "account_code" when submitting the form.

Am I trying to go about gathering this data value incorrectly? Am I missing something in the code in order to update this value?

Any help or pointers are appreciated. Thank you very much.


Best,
Mihai Dan
Air Delights

_______________________________________________
interchange-users mailing list
interchange-users@interchangecommerce.org
https://www.interchangecommerce.org/mailman/listinfo/interchange-users
Re: Value not updating [ In reply to ]
Mihai,

If I understand you correctly, you want [value account_code] to contain
the selected account_code submitting in the form previously?

If so, you can use [cgi account_code] to get the form submission on the
immediate next page only, or place [update values] earlier on the page
which will copy account_code from cgi to values space. (But which may have
other effects you don't want, so would need careful testing.)

Jon


On Thu, 5 Nov 2020, mihai@airdelights.com wrote:

> Hello all,
>  
> I am having some trouble with a <select> HTML tag on one of my pages. I have a form that is supposed to get information from the <select> options before submitting.
>
>
> <FORM ACTION="[area commerce]" METHOD="POST" name=payment>
> ...
> <input type="hidden" name="cc_code" value="[value account_code]">
> ...
> <select name=account_code tabindex="25001">
> <option value="">-</option>
> [cards]
> <option value=[card-param code] [if-card-param !token] disabled="disabled"[/if-card-param]>[card-param reference]</option>
> [/cards]
> </select>
>
>
> [cards] in this instance refers to the list of cards resulting from a query based on the customer ID.
>
> My issue stems from the "account_code" value. From my understanding, the value of the <select> field should be updating based on which option is being selected. However, when I submit the form, the value being passed through "cc_code" is the value found on page load, not the one selected through the <option>. In other words, selecting an option does not change or update the value of "account_code" when submitting the form.
>
> Am I trying to go about gathering this data value incorrectly? Am I missing something in the code in order to update this value?
>
> Any help or pointers are appreciated. Thank you very much.
>
>
> Best,
> Mihai Dan
> Air Delights


--
Jon Jensen
End Point Corporation
https://www.endpoint.com/
Re: Value not updating [ In reply to ]
Hello Jon,
 
Thank you for the help. It seems that I wasn't passing the value correctly as you mentioned. All works well now!

______________________

Mihai Dan
Air Delights, Inc.
https://www.airdelights.com
1 (800) 440-5556


-----Original Message-----
From: "Jon Jensen" <jon@endpoint.com>
Sent: Tuesday, December 8, 2020 9:44am
To: interchange-users@interchangecommerce.org
Subject: Re: [ic] Value not updating



Mihai,

If I understand you correctly, you want [value account_code] to contain
the selected account_code submitting in the form previously?

If so, you can use [cgi account_code] to get the form submission on the
immediate next page only, or place [update values] earlier on the page
which will copy account_code from cgi to values space. (But which may have
other effects you don't want, so would need careful testing.)

Jon


On Thu, 5 Nov 2020, mihai@airdelights.com wrote:

> Hello all,
>  
> I am having some trouble with a <select> HTML tag on one of my pages. I have a form that is supposed to get information from the <select> options before submitting.
>
>
> <FORM ACTION="[area commerce]" METHOD="POST" name=payment>
> ...
> <input type="hidden" name="cc_code" value="[value account_code]">
> ...
> <select name=account_code tabindex="25001">
> <option value="">-</option>
> [cards]
> <option value=[card-param code] [if-card-param !token] disabled="disabled"[/if-card-param]>[card-param reference]</option>
> [/cards]
> </select>
>
>
> [cards] in this instance refers to the list of cards resulting from a query based on the customer ID.
>
> My issue stems from the "account_code" value. From my understanding, the value of the <select> field should be updating based on which option is being selected. However, when I submit the form, the value being passed through "cc_code" is the value found on page load, not the one selected through the <option>. In other words, selecting an option does not change or update the value of "account_code" when submitting the form.
>
> Am I trying to go about gathering this data value incorrectly? Am I missing something in the code in order to update this value?
>
> Any help or pointers are appreciated. Thank you very much.
>
>
> Best,
> Mihai Dan
> Air Delights


--
Jon Jensen
End Point Corporation
https://www.endpoint.com/_______________________________________________
interchange-users mailing list
interchange-users@interchangecommerce.org
https://www.interchangecommerce.org/mailman/listinfo/interchange-users

_______________________________________________
interchange-users mailing list
interchange-users@interchangecommerce.org
https://www.interchangecommerce.org/mailman/listinfo/interchange-users
Re: Value not updating [ In reply to ]
On Tue, 8 Dec 2020, mihai@airdelights.com wrote:

> Thank you for the help. It seems that I wasn't passing the value
> correctly as you mentioned. All works well now!

Glad to hear it!

Jon


> -----Original Message-----
> From: "Jon Jensen" <jon@endpoint.com>
> Sent: Tuesday, December 8, 2020 9:44am
> To: interchange-users@interchangecommerce.org
> Subject: Re: [ic] Value not updating
>
>
>
> Mihai,
>
> If I understand you correctly, you want [value account_code] to contain
> the selected account_code submitting in the form previously?
>
> If so, you can use [cgi account_code] to get the form submission on the
> immediate next page only, or place [update values] earlier on the page
> which will copy account_code from cgi to values space. (But which may have
> other effects you don't want, so would need careful testing.)
>
> Jon
>
>
> On Thu, 5 Nov 2020, mihai@airdelights.com wrote:
>
>> Hello all,
>>  
>> I am having some trouble with a <select> HTML tag on one of my pages. I have a form that is supposed to get information from the <select> options before submitting.
>>
>>
>> <FORM ACTION="[area commerce]" METHOD="POST" name=payment>
>> ...
>> <input type="hidden" name="cc_code" value="[value account_code]">
>> ...
>> <select name=account_code tabindex="25001">
>> <option value="">-</option>
>> [cards]
>> <option value=[card-param code] [if-card-param !token] disabled="disabled"[/if-card-param]>[card-param reference]</option>
>> [/cards]
>> </select>
>>
>>
>> [cards] in this instance refers to the list of cards resulting from a query based on the customer ID.
>>
>> My issue stems from the "account_code" value. From my understanding, the value of the <select> field should be updating based on which option is being selected. However, when I submit the form, the value being passed through "cc_code" is the value found on page load, not the one selected through the <option>. In other words, selecting an option does not change or update the value of "account_code" when submitting the form.
>>
>> Am I trying to go about gathering this data value incorrectly? Am I missing something in the code in order to update this value?
>>
>> Any help or pointers are appreciated. Thank you very much.
>>
>>
>> Best,
>> Mihai Dan
>> Air Delights


--
Jon Jensen
End Point Corporation
https://www.endpoint.com/