Skip to main content
Participating Frequently
July 16, 2008
Question

Store yes and no radio field in session - please help

  • July 16, 2008
  • 6 replies
  • 388 views
Hello,

I created a Yes/No field with Yes to be checked by default and store this in session. When i view a report, there are 'Unknown' values. Can anyone please help me? why have 'Unknown' values on the output?

Thanks.
    This topic has been closed for replies.

    6 replies

    Participating Frequently
    July 16, 2008
    When the user submit the form, then it redirect to the main page.
    Thanks.
    Inspiring
    July 16, 2008
    jennypretty2 wrote:
    > I changed it to the same name but I still have 'unknown' value on the output.
    > I dont know why there is an 'unknown' value.
    > Please advice.
    > Thanks.

    Well what does the output do?

    I can only guess what your application actually does once the form is
    submitted.
    Participating Frequently
    July 16, 2008
    I changed it to the same name but I still have 'unknown' value on the output.
    I dont know why there is an 'unknown' value.
    Please advice.
    Thanks.
    Inspiring
    July 16, 2008
    jennypretty2 wrote:
    > here is my code:
    >
    ><input name="iconsent" ...>
    ><input name="consent" ...>


    Does that highlight the issue.

    SPOILER SPACE
    ..........
    .........
    .......
    .....
    ...
    .

    Only radio buttons with the same name will become a list of mutually
    exclusive values.

    What you have here are two separate radio 'sets', each set containing
    only one possible value.

    Participating Frequently
    July 16, 2008
    here is my code:

    <table width="100%" border="0" cellpadding="3" cellspacing="0">
    <tr>
    <td><input name="iconsent" id="a_yes" type="radio" value="yes" checked></td>
    <td><label for="a_yes"> I authorize</label></td>
    </tr>
    <tr>
    <td><input name="consent" id="a_no" type="radio" value="no"></td>
    <td><label for=a_no"> I do <span class="brownbold">not</span>
    authorize</label></td>
    </tr>
    </table>
    -----------------------------
    action.cfm
    <cfif not IsEmpty("session.consent")><cfset remote["consent"]=#trim(session.consent)#></cfif>
    Inspiring
    July 16, 2008
    why is your code broken? no idea - you didn't post any code...

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/