IF comparison fails when creating ticket through html form


We have two custom fields named ‘Country’ and ’ Case’.
We have also a scrip for ‘Auto assign ticket on create’ for the condition “On Create”.

In this script one of the condition is:

if ( ($self->TicketObj->CustomFieldValuesAsString ( 'Country' ) eq 'Germany' )  && ( $self->TicketObj->CustomFieldValuesAsString ( 'Case' ) eq 'Post-Sale' ) ){
	$derivedGroupName = 'Tier 1 Germany Service';
	$DefaultValue = '49';

Full scrip is here:

Also I made an html form in order to create a new ticket:

The problem is:
When I choose the custom fields through the RT UI site and create a ticket the comparison in the IF condition is working good, but when I create a ticket through the html form, the comparison doesn’t work good even if the both sides are equal.

Why is that? What I’m missing?