2 Replies Latest reply on Dec 1, 2008 8:33 AM by Newsgroup_User

    Dynamic Table

    Level 1
      I have 10 rows compose of 3 textbox each. Then when press submit it will go to a page so that it will be sent thru email in table form. My problem is in my 10 rows if only 5 rows have data the other remaining rows is still included in the table and it produce a blank space. How will I put the rows in a table who only have data in them?

      Thanks in advance
        • 1. Re: Dynamic Table
          mbdooly
          WIth out seeing what you are doing because you have not provided a sample of the code, I can only suggest that you might want to use a cfif contidition, that is you look at the field if it is empty do not supply it. Remember text boxes have a on off state. So if you look for that condition that should solve the riddle.
          Again using :

          <cfif textbox#1 is "on">show data in table</cfif>

          mdooly
          • 2. Re: Dynamic Table
            Level 7
            well, textboxes DO NOT have an on/off state. they either have text in
            then, and thus the length of their value is > 0, or they do not.

            the condition to check for, thus, is the length of textbox's value:
            <cfif len(trim(form.mytextboxfield)) gt 0>do what you need to do with
            it</cfif>

            or, shorter, just: <cfif len(trim(form.mytextboxfield))>...</cfif>


            Azadi Saryev
            Sabai-dee.com
            http://www.sabai-dee.com/