The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Bug Report: Empty textarea fields shown in email templates - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Bug Report: Empty textarea fields shown in email templates (/showthread.php?tid=2244) |
Bug Report: Empty textarea fields shown in email templates - flip3 - Oct 24th, 2012 Hello, When I define a field as textarea field and it is empty, it still shows up in the email template when using this code: Code: {if $ANSWER_accommodation_description}Description: {$ANSWER_accommodation_description} Additionally, it adds two line breaks after the field instead of one in the case of other field types. I solved this now by using simply this code (not sure if that's ok): Code: {if $ANSWER_accommodation_description}Description: {$ANSWER_accommodation_description}{/if} I was also trying to use double if-tags in email templates which produced an error. Is there another chance to show a block of information only if a specific condition matches? In my case it should be that the airport_transfer field value should match with "yes": Code: {if $ANSWER_airport_transfer=yes}### TRANSFER ### Many thanks, Philip RE: Bug Report: Empty textarea fields shown in email templates - kwhitlock - Oct 29th, 2012 If you do a character count on a LARGE TEXT field, even though it may be NULL the count returns as 10. If there are characters in that field, the character count is 10 + length of the string. I would think this is a bug. I am facing the same problem. For the fields that are <256, the count returns fine. try {$nameOfField|count_characters:true} RE: Bug Report: Empty textarea fields shown in email templates - flip3 - Nov 4th, 2012 Hello, Thanks for your feedback. I tried both: {if $ANSWER_school_schedule|count_characters:true}Your schedule: {$ANSWER_school_schedule} {/if} -> Doesn't change anything. {if $ANSWER_school_schedule}Your schedule: {$ANSWER_school_schedule|count_characters:true} {/if} -> Show the character count which is "80" in my case instead of the field content. Philip RE: Bug Report: Empty textarea fields shown in email templates - kwhitlock - Nov 4th, 2012 So is this a bug or not? I am still confused to the count of characters in a textarea. RE: Bug Report: Empty textarea fields shown in email templates - flip3 - Nov 5th, 2012 For me it's a bug but I'm not a developer. The Form Tools team has to advice ... |