House of Fusion
Home of the ColdFusion Community
Hostmysite Dedicated Hosting

Search cf-talk

August 28, 2008

<<   <   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             

Subscribe Now
Fusion Authority Quarterly Update - ColdFusion 8 Special Edition

For ColdFusion hosting try HostMySite.com.
Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

cfForm binding text field, visible to checkbox

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
have also tried
Paul Ihrig
04/04/08 09:56 A
sweet
Paul Ihrig
04/04/08 01:37 P
Just a guess...
Sonny Savage
04/04/08 01:44 P
i tried that too man..
Paul Ihrig
04/04/08 01:47 P
Sonny! You rock man!!!!
Paul Ihrig
04/04/08 03:08 P
NM.
Paul Ihrig
04/04/08 03:09 P
ok...
Paul Ihrig
04/19/08 01:55 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Ihrig
04/04/2008 09:51 AM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Ihrig
04/04/2008 09:56 AM

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'}"  />

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Ihrig
04/04/2008 01:37 PM

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 ++ '++'

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Sonny Savage
04/04/2008 01:44 PM

Just a guess... {ul3R_SSsp.text + ul4_SSsp.text + ul3r4x_SSsp.text + q4_0_SSsp.text} On Fri, Apr 4, 2008 at 1:37 PM, Paul Ihrig <pihrig@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Ihrig
04/04/2008 01:47 PM

i tried that too man.. On Fri, Apr 4, 2008 at 1:44 PM, Sonny Savage <sonnysavage@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Sonny Savage
04/04/2008 02:35 PM

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. On Fri, Apr 4, 2008 at 1:47 PM, Paul Ihrig <pihrig@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Ihrig
04/04/2008 03:08 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Ihrig
04/04/2008 03:09 PM

NM. just put in default value to 0 that fixed it... sw33t!

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Sonny Savage
04/04/2008 04:54 PM

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> On Fri, Apr 4, 2008 at 3:08 PM, Paul Ihrig <pihrig@gmail.com> wrote: > NM. > just put in default value to 0 > that fixed it... > sw33t!

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Paul Ihrig
04/19/2008 01:55 PM

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 />


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists