Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Reset One field in Coldfusion Flash Form

Explorer ,
Aug 14, 2009 Aug 14, 2009

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!

1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 19, 2009 Aug 19, 2009

settled elsewhere in these forums

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 01, 2009 Sep 01, 2009
LATEST

Correct this was the solution.

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

Use onclick .....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources