Form variable populated in request, but empty string on receiving form

117 Views Asked by At

Something weird or something obvious. I've inherited a coldfusion application, which I need to work with as it is for the meantime, including the widespread use of <CFFORM> etc.

We have a select list as follows:

<cfselect
     class="selGroup"
     query="get_merchant_categories"
     name="category_id"             
     display="category_name"                    
     value="unique_id"                      
     onclick="document.getElementById('Merchant_Groups_Form').submit();"
     size="15"> 
</cfselect>

This produces the following in the DOM:

<select name="category_id" id="category_id" class="selGroup" onclick="document.getElementById('Merchant_Groups_Form').submit();" size="15">
    <option value="1">Equestrian Sports</option>
    <option value="2">Other</option>
</select>

and the following page output:

enter image description here

Upon clicking the first item in the select list (Equestrian Sports), the request is seen as follows (NOTE: CSRFTOKEN is a hidden form field):

enter image description here

And the dump at the top of the receiving page is:

enter image description here

So, all is good there.

HOWEVER, when I click the second item in the list ("Other"), the request is OK and looks like this:

enter image description here

But, the dump on the receiving page looks like this:

enter image description here

Been trying to figure this out for over an hour and have no idea what is going on. Maybe someone's come across this before.

0

There are 0 best solutions below