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

Reset One field Only 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!

TOPICS
Flash integration
1.5K
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

correct answers 1 Correct answer

Community Expert , Aug 16, 2009 Aug 16, 2009

Put this in your pipe. Does  it smoke?

<cfform format="flash">
<cfformgroup type="horizontal">
<cfinput type="datefield" name="DATE1" label="Diagnosis Date 1:" width="100" value="#now()#"/>
</cfformgroup>
<cfformgroup type="horizontal">
<cfinput type="datefield" name="DATE2" label="Diagnosis Date 2:" width="100" bind="{DATE1.text}"/>
<cfinput type="button" name="date2button" onclick="{DATE2.text=''}" value="Reset Date 2">
</cfformgroup>
<cfformgroup type="horizontal">
<cfinput type="datefield" name="DATE3

...
Translate
Community Expert ,
Aug 16, 2009 Aug 16, 2009

Put this in your pipe. Does  it smoke?

<cfform format="flash">
<cfformgroup type="horizontal">
<cfinput type="datefield" name="DATE1" label="Diagnosis Date 1:" width="100" value="#now()#"/>
</cfformgroup>
<cfformgroup type="horizontal">
<cfinput type="datefield" name="DATE2" label="Diagnosis Date 2:" width="100" bind="{DATE1.text}"/>
<cfinput type="button" name="date2button" onclick="{DATE2.text=''}" value="Reset Date 2">
</cfformgroup>
<cfformgroup type="horizontal">
<cfinput type="datefield" name="DATE3" label="Diagnosis Date 3:" width="100" bind="{DATE1.text}"/>
<cfinput type="button" name="date3button" onclick="{DATE3.text=''}" value="Reset Date 3">
</cfformgroup>
</cfform>

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 ,
Aug 17, 2009 Aug 17, 2009
LATEST

It is smoking really well. Very Smooth!

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