Closed (fixed)
Project:
Token
Version:
6.x-1.13
Component:
Token Actions
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Jul 2010 at 17:00 UTC
Updated:
10 Jun 2011 at 03:02 UTC
On function token_actions_goto_action_form($context){} (line 193)
a '#maxlength' array property is not configured and this makes the form parser to allow up a limited characters string, 80 characters if I am not mistaken.
Even though field parameters on table actions is LONGTEXT, which is REALLY big, form does not allow such a string to be saved.
This creates a problem when many tokens need to be used.
Solution :
Include a '#maxlength' form value like below
function token_actions_goto_action_form($context) {
$form['url'] = array(
'#type' => 'textfield',
'#title' => t('URL'),
'#description' => t('The URL to which the user should be redirected. This can be an internal URL like node/1234 or an external URL like http://drupal.org.'),
'#default_value' => isset($context['url']) ? $context['url'] : '',
'#maxlength' => '400',
'#required' => TRUE,
);
| Comment | File | Size | Author |
|---|---|---|---|
| token_actions.module.txt | 7.75 KB | OsterD |
Comments
Comment #1
dave reidDefault maxlength is 255 and this is now the standard set by core's action form as well. You can use hook_form_alter() to change this on your local site if you need to, otherwise the default works for the majority of use cases.