function rules_condition_text_compare_form in Rules 6
Condition: Textual comparison configuration form
Related topics
File
- rules/
modules/ rules.rules_forms.inc, line 14 - Forms for the integration provided by rules
Code
function rules_condition_text_compare_form($settings = array(), &$form) {
$form['settings']['text1']['#title'] = t('Two texts to compare');
$form['settings']['text2']['#title'] = '';
$form['settings']['regex'] = array(
'#type' => 'checkbox',
'#title' => t('Evaluate the second text as a regular expression.'),
'#default_value' => isset($settings['regex']) ? $settings['regex'] : 0,
'#description' => t('If enabled, the matching pattern will be interpreted as a <a href="@regex-wikipedia">regex</a>. Tip: <a href="@RegExr">RegExr: Online Regular Expression Testing Tool</a> is helpful for learning, writing, and testing Regular Expressions.', array(
'@regex-wikipedia' => 'http://en.wikipedia.org/wiki/Regular_expression',
'@RegExr' => 'http://gskinner.com/RegExr/',
)),
);
}