House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

cfForm binding text field, visible to checkbox

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

cfForm binding text field, visible to checkbox

ok... Paul Ihrig 04/19/2008 01:55 PM
Hello Paul, turns out that ActionScript has a Number() function which does Sonny Savage 04/04/2008 04:54 PM
NM. Paul Ihrig 04/04/2008 03:09 PM
Sonny! You rock man!!!! Paul Ihrig 04/04/2008 03:08 PM
OK, it was an issue of value typing.  This works: Sonny Savage 04/04/2008 02:35 PM
i tried that too man.. Paul Ihrig 04/04/2008 01:47 PM
Just a guess... Sonny Savage 04/04/2008 01:44 PM
sweet Paul Ihrig 04/04/2008 01:37 PM
have also tried Paul Ihrig 04/04/2008 09:56 AM
i am trying to bind a text fields viability to a checkbox. Paul Ihrig 04/04/2008 09:51 AM

04/19/2008 01:55 PM
Author: Paul Ihrig Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55888#303805 ok... i can bind from the cftextarea... but why cant i Len the chars? <cfinput type="text" bind="LEN({descLong.text})" name="word_count" id="word_count" style="border:0px;" size="50" width="300" height="40"> Characters remaining<br />
04/04/2008 04:54 PM
Author: Sonny Savage Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55888#302765 Hello Paul, turns out that ActionScript has a Number() function which does what you needed. I've never used flash forms before, so this may seem like a silly question, but when I display this form the first two fields are empty rather than having the value of zero.  Why is that? <cfform format="flash" width="500">     <cfinput name="FieldOne" type="text" label="Field One" validate="float" value="0" width="60">     <cfinput name="FieldTwo" type="text" label="Field Two" validate="float" value="0" width="60">     <cfinput name="FieldTotal" type="text" label="Field Total" enabled="false" bind="{Number(FieldOne.text) + Number(FieldTwo.text)}" width="60"> </cfform> > NM. > just put in default value to 0 > that fixed it... > sw33t!
04/04/2008 03:09 PM
Author: Paul Ihrig Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55888#302755 NM. just put in default value to 0 that fixed it... sw33t!
04/04/2008 03:08 PM
Author: Paul Ihrig Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55888#302754 Sonny! You rock man!!!! thank you.... now 1 more questions.... Q1: how do i IF it out so i dont get NAN if nothing is enterd or if only 2 fileds are enterd? <cfinput type="text" name="ul3R_SSsp" width="50" height="18"  /> <cfinput type="text" name="ul4_SSsp" width="50" height="18"  /> <cfinput type="text" name="ul3r4x_SSsp" width="50" height="18"  /> <cfinput type="text" name="q4_0_SSsp" width="50" height="18"  /> <cfinput type="text" name="StainlessSteel_totalsp" width="50" height="18" bind="{(ul3R_SSsp.text * 1) + (ul4_SSsp.text * 1) + (ul3r4x_SSsp.text * 1) + (q4_0_SSsp.text * 1)}"> Side note: you also solved my problem to count the number of check boxes checked. as a bind in a text field.             <cfinput type="checkbox" name="ul3R_SS" height="18"  />             <cfinput type="checkbox" name="ul4_SS" height="18"  />             <cfinput type="checkbox" name="ul3r4x_SS" height="18"  />             <cfinput type="checkbox" name="q4_0_SS" height="18"  />             <cfinput type="text" name="StainlessSteel_total" width="50" height="18"              bind="{(ul3R_SS.selected * 1) + (ul4_SS.selected * 1) + (ul3r4x_SS.selected * 1) + (q4_0_SS.selected * 1)}" /> thanks again! i do appreciate it. -paul
04/04/2008 02:35 PM
Author: Sonny Savage Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55888#302751 OK, it was an issue of value typing.  This works: <cfform format="flash" width="500">     <cfinput name="FieldOne" type="text" label="Field One" width="60" />     <cfinput name="FieldTwo" type="text" label="Field Two" width="60" />     <cfinput name="FieldTotal" type="text" label="Field Total" bind="{(FieldOne.text * 1) + (FieldTwo.text * 1)}" width="60" /> </cfform> I don't know ActionScript very well, so there may be a better way of casting the values.  The total field with show 'NaN' if the other fields are empty or not numeric. ----- Excess quoted text cut - see Original Post for more -----
04/04/2008 01:47 PM
Author: Paul Ihrig Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55888#302745 i tried that too man.. ----- Excess quoted text cut - see Original Post for more -----
04/04/2008 01:44 PM
Author: Sonny Savage Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55888#302743 Just a guess... {ul3R_SSsp.text + ul4_SSsp.text + ul3r4x_SSsp.text + q4_0_SSsp.text} ----- Excess quoted text cut - see Original Post for more -----
04/04/2008 01:37 PM
Author: Paul Ihrig Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55888#302742 sweet     <cfinput type="checkbox" name="vm_O" label="Others"  />     <cfinput type="text" name="vm_Other" label="Please specify" visible="{vm_O.selected}"/> from: http://www.asfusion.com/blog/entry/binding-checkboxes-in-flash-forms now... how do i calculate results of text field on the fly? <cfinput type="text" name="StainlessSteel_totalsp" bind="{ul3R_SSsp.text}+{ul4_SSsp.text}{ul3r4x_SSsp.text}+{q4_0_SSsp.text}"> /> that just puts + between returned results.. like 3+2+5+1 not 11 i have tried ++ '++'
04/04/2008 09:56 AM
Author: Paul Ihrig Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55888#302714 have also tried <cfinput type="checkbox" name="vm_O" label="Others" /> <cfinput type="text" name="vm_Other" label="Please specify" visible="{vm_O.selectedItem.data != 'false'}"  />
04/04/2008 09:51 AM
Author: Paul Ihrig Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:55888#302710 i am trying to bind a text fields viability to a checkbox. based on if it is checked or not... <cfinput type="checkbox" name="vm_O" label="Others" /> <cfinput type="text" name="vm_Other" label="Please specify" visible="{vm_O.selectedData = 'True'}" /> dosnt work... thanks -paul
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference