Hello forum,
It seems easy to have a textbox field mandatory in a .dtl with:
<label class="Mandatory" for="XXX">
and
<div id="XXXError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
But how to make a listbox field mandatory?
As I explained here, I added the listbox for priorities in the Reply page. But now I want to make this field mandatory.
Does anybody know how to?
Regards,
HervE
[SOLVED] Make a listbox field mandatory
Moderator: crythias
[SOLVED] Make a listbox field mandatory
Last edited by HervE on 07 Mar 2012, 15:36, edited 1 time in total.
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
Re: Make a listbox field mandatory
Hello forum,
I somehow managed to have it mandatory.
I get no "This field is mandatory" popup unfortunately. (Does anybody know how to?)
Yet the field has to be selected in the listbox, and its caption appears in red.
Here is what I did in the related .pm file:This is the Class => 'Priority Validate_RequiredDropdown' parameter that makes it mandatory.
Regards,
HervE
I somehow managed to have it mandatory.
I get no "This field is mandatory" popup unfortunately. (Does anybody know how to?)
Yet the field has to be selected in the listbox, and its caption appears in red.
Here is what I did in the related .pm file:
Code: Select all
$Param{PriorityStrg} = $Self->{LayoutObject}->BuildSelection(
Data => \%PriorityList,
Name => 'NewPriorityID',
%Priority,
Class => 'Priority Validate_RequiredDropdown ',
);
Regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30