IF comparison fails when creating ticket through html form

Hi,

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' ) ){
	$users->MemberOfGroup(49);
	$derivedGroupName = 'Tier 1 Germany Service';
	$DefaultValue = '49';
	}

Full scrip is here:
https://pastebin.com/UzmVHuvi

Also I made an html form in order to create a new ticket:
https://pastebin.com/erENiv16

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?

Thanks,
Adi