Skip to main content
Inspiring
December 1, 2008
Question

Dynamic Table

  • December 1, 2008
  • 2 replies
  • 395 views
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
This topic has been closed for replies.

2 replies

Inspiring
December 1, 2008
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/
Participant
December 1, 2008
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