
HI - I am having a problem getting variables from my html templates to the .pm files. For instance, I created a hidden input in AgentClose.dtl and I can't get the variable to show up in the AgentClose.pm file. I wrote a if statement that prints an error if the variable is there and nothing happens. When I change the if statement to check for a hidden input that is already in the dtl file, it throws the error. What am i missing???? I killed my session, and re logged in and nothing changes. Mark W.

Hi Mark, Mark Wallace wrote:
*I am having a problem getting variables from my html templates to the .pm files. For instance, I created a hidden input in AgentClose.dtl and I can't get the variable to show up in the AgentClose.pm file. I wrote a if statement that prints an error if the variable is there and nothing happens. When I change the if statement to check for a hidden input that is already in the dtl file, it throws the error. What am i missing???? I killed my session, and re logged in and nothing changes.
You don't need to relogin. And normally it should also work like you wrote. Maybe you can post the location of the files which you changes. Check also: o reload the browser after changeing the .dtl o check the browser html source if the input field is really there o check then naming of the new input field PS: But normally this is the right way.
Mark W.
Martin -- ((otrs)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!

Hi Martin - Thanks for your response.
Check also: o reload the browser after changeing the .dtl Did this o check the browser html source if the input field is really there Did this o check then naming of the new input field Did this ad nauseum.
From AgentClose.dtl. The input is named "Check Action".

Hi Mark, Mark Wallace wrote:
[...]
From AgentClose.pm
sub Run { my $Self = shift; my %Param = @_; my $Output; my $QueueID = $Self->{QueueID}; # check needed stuff # if ($Self->{Subaction} eq 'Store') { *# This value comes from AgentClose.dtl and my If statement catches it.* if ($Self->{CheckAction} eq 'Checked') { *#This is my test value I added to the AgentClose.dtl form and I get nothing*.
Here is the problem. Action, Subaction, TicketID are default params and availabe in $Self. But if you have custom params, you need to get this by: [...] my $CheckAction = $Self->{ParamObject}->GetParam(Param => 'CheckAction'); if ($CheckAction eq 'Checked') { # do something } [...] Martin -- ((otrs)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!
participants (2)
-
Mark Wallace
-
Martin Edenhofer