Skip to main content
Inspiring
August 14, 2009
Question

Reset One field in Coldfusion Flash Form

  • August 14, 2009
  • 1 reply
  • 1909 views

I have a flash form with a fair amount date fields.  I use the code

<cfinput type="datefield" name="DATE1" label="Diagnosis Date:" width="100" value="#now()#"/>

This is the master date field. It populates about 10 other date fields by using the following code for the other 10 fields.

<cfinput type="datefield" name="DATE2" label="Diagnosis Date:" width="100" bind={DATE1.txt}/>

There are certain cases where date fields 7-10 are not used. Unfortuantely, fields 7-10 in those cases are prepopulated because of the bind. I want to put a reset/clear button besides each of those date fields (7-10). Is there a way to code the reset/clear button to only clear the corresponding date field? Right now, I have the users choosing the same date as DATE1 to clear out the field. That is 2 clilcks. I would prefer the users just to click on a reset/clear button.

TIA!

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    August 19, 2009

    settled elsewhere in these forums

    icarus013Author
    Inspiring
    September 1, 2009

    Correct this was the solution.

    <cfinput type="button" name="date2button" onclick="{DATE2.text=''}" value="Reset Date 2">

    Use onclick .....