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

Dynamic Table

Participant ,
Dec 01, 2008 Dec 01, 2008
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
TOPICS
Advanced techniques
399
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
Community Beginner ,
Dec 01, 2008 Dec 01, 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
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
LEGEND ,
Dec 01, 2008 Dec 01, 2008
LATEST
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/
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