Hi,
I really need help, I try to develop a new web form that contain checkbox,
<input type="checkbox" name="SecuritySI" value="Yes" $Data{"Checked"}></input>
when a checkbox is checked it's ok,
but I need the value of the variable is "Yes" when it is checked and "No" when it is not
Can you help me plz
checkbox
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: checkbox
In your code you have to write something like this:
Code: Select all
my $CheckboxValue = $Self->{ParamObject}->ParamGet( Param => 'SecuritySI' );
if ( !$CheckboxValue || $CheckboxValue ne 'Yes' ) {
$CheckboxValue = 'No'
}
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: checkbox
thank you so mutch
Re: checkbox
thank you again,
and can you tell me how can I do it for display,
what I need is: if SecuritySI= 'yes' the checkbox appears checked
and can you tell me how can I do it for display,
what I need is: if SecuritySI= 'yes' the checkbox appears checked