The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Form Builder: How to associate explanatory text with a "view field group"? - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8)
+--- Forum: Modules (https://forums.formtools.org/forumdisplay.php?fid=16)
+--- Thread: Form Builder: How to associate explanatory text with a "view field group"? (/showthread.php?tid=1958)



Form Builder: How to associate explanatory text with a "view field group"? - philou - Mar 19th, 2012

Hi,

what is the best practice for placing a paragraph of text before a View Field Group? In my form am asking questions, to which the form fields inside the view group store the answers. So far I have just written my question text in the "title" field of the View Field Group, but apparently there is a limit as to how much text this "title" can hold?

Many thanks for your help,
p.



RE: Form Builder: How to associate explanatory text with a "view field group"? - Ben - Mar 21st, 2012

Great question.

Yes, the "View Field Group" (verbose, I know) has a 256 chars max. But I see that the field doesn't actually limit you to that number when entering text - I'll log that as a bug.

I kind of only pictured that field to be used for short headings. Form Tools doesn't properly support a way to embed blocks of text, which would be very nice.

Probably your best bet would be to add the text directly into the Form Builder Template Set template and hook it up to only show it for that View Field Group.

To do that, update your "Form Page" Template Type in the Template Set you're using. Add something like this within the main
{{foreach from=$grouped_fields ... }} section:

Code:
{{if $group.group_id == X}}
  Enter your blurb here.
{{/if}}

To find out "X" (i.e. the View Field Group ID), the simplest way is to just go to your Review page of the form (enable that page in the Form Builder if you don't have it), then put through a submission and click the "Edit" link for that section. The URL will contain the ID for that View Field Group.

Sorry for the convoluted answer; this usage wasn't something I anticipated - but it's certainly do-able.

- Ben


RE: Form Builder: How to associate explanatory text with a "view field group"? - philou - Mar 21st, 2012

Dear Ben,

thanks for your pointer. While thinking about it in the last few days, I considered looking at the Mysql table structure and maybe just increase the max number of characters for the database-field holding the "View Filed Group" title to e.g. 512. Do you think that would also work? It seems to me to be somewhat cleaner than putting a lot of text inside the template and checking for the group IDs with a bunch of IF statements.

What's your opinion?

Many thanks!
p.



RE: Form Builder: How to associate explanatory text with a "view field group"? - Ben - Mar 21st, 2012

Hi Philou,

Sure! Though I think 256 is the max number of chars for VARCHAR fields (for the MySQL versions that FT supports). Instead, change it to a TEXT or MEDIUMTEXT field.

One drawback is that the System Check module's Table Verification test will throw an error when it examines that particular table structure. But as long as you know about it, it won't cause any other errors.

All the best -

Ben