$config = CRM_Core_Config::singleton();
$form->applyFilter('__ALL__', 'trim');
- $form->add('text',
- 'text',
- ts('Find'),
- TRUE
- );
+ $form->add('text', 'text', ts('Find'), NULL, TRUE);
// also add a select box to allow the search to be constrained
$tables = ['' => ts('All tables')];
<div class="form-item">
<table class="form-layout-compressed">
<tr>
- <td class="label">{$form.text.label}</td>
- <td>{$form.text.html}</td>
- <td class="label">{ts}in...{/ts}</td>
- <td>{$form.table.html}</td>
+ <td>
+ <label>{$form.text.label}</label>
+ {$form.text.html}
+ </td>
+ <td>
+ <label>{ts}in...{/ts}</label>
+ {$form.table.html}
+ </td>
<td>{$form.buttons.html} {help id="id-fullText"}</td>
</tr>
</table>
$form->_action = CRM_Core_Action::ADD;
},
],
+ // Also a bit flawed, but catches simple stuff.
+ 'Fulltext search' => [
+ 'CRM_Contact_Form_Search_Custom',
+ function(CRM_Core_Form $form) {
+ $form->_action = CRM_Core_Action::BASIC;
+ $form->set('csid', 15);
+ },
+ ],
];
}