The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (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.31 (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.31 (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.31 (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.31 (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.31 (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 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Form Constants for use in 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: Form Constants for use in templates? (/showthread.php?tid=1034)



Form Constants for use in templates? - russellfeeed - Jan 13th, 2011

Hi

I'd like to be able to create some values associated with a form.
E.g for Form X, I'd like to associate a URL http://www.x.com which I could then reuse in various Emails etc using Smarty.

The values is associated with the form, and with a submission, and so I need to be able to edit it when I configure/edit the form (alongside the View, Emails, Fields, Database tabs etc)

This may be a feature request, but I'm wondering if anyone has done this or perhaps figured out where to put such constants in a config file somewhere.

Thanks
Russell
To elaborate... this feature comes into its own when used with the Form Backup Module.

Many of my forms are the same, but require slight tailoring.
e.g. the emails need to have the correct address at the bottom.

This would be much easier if I could define constants which could be used in the Smarty email templates, at the form level.

Cheers
Russell




RE: Form Constants for use in templates? - Ben - Jan 18th, 2011

Hi Russell,

Sorry for the wait on this!

Interesting one... I was *going* to link you to this page, but I see I haven't finished writing it. Ack. Okay, check the link shortly: it explains how to use the Hooks Manager module to create a placeholder for use in your email templates.
http://modules.formtools.org/hooks_manager/?page=add_email_template_placeholder

However, it's not global - it would just be for use in your email templates, not anywhere else.

Unfortunately, defining globals like this isn't really supported yet. But give me another concrete example of how you'd like to use it and I'll see if I can think up a workaround. In the meantime, I'll update that page!

[EDIT: all done. Let me know if I'm not clear on any of the steps.]

- Ben


RE: Form Constants for use in templates? - russellfeeed - Jan 25th, 2011

Thanks Ben

I've installed the Hooks Manager and started playing with it.

Cheers
Russell