Hi,
I am developing a new ticket menu module and I want to know how can I retrieve data in perl module sent from the .dtl file after clicking submit button in the form. Please have a look at the web page. The data will be selected checkboxes.
Thanks
Gaurav
How to Retrieve form data on perl module
-
- Znuny advanced
- Posts: 108
- Joined: 23 Oct 2013, 09:17
- Znuny Version: 3.3.0 beta 2
- Real Name: Gaurav Munjal
- Company: Nagarro
How to Retrieve form data on perl module
You do not have the required permissions to view the files attached to this post.
Re: How to Retrieve form data on perl module
Hello Gaurav,
normally you have forms like this:
This basic form construct will cause that your post will arrive at http://www.yourotrsinstallation/otrs/in ... Field=test
In your related frontend module script, you can retrieve the request parameters by using the ParamObject:
After that you can work with the data and setup the next dtl for instance.
Cheers, Marco
normally you have forms like this:
Code: Select all
<form action="$Env{"CGIHandle"}" method="post" class="Validate PreventMultipleSubmits">
<input type="hidden" name="Action" value="AgentYourFrontendModule">
<input type="hidden" name="Subaction" value="YourSubaction">
<input type="hidden" name="AnotherField" value="test">
...
</form>
In your related frontend module script, you can retrieve the request parameters by using the ParamObject:
Code: Select all
my @ParamNames = $Self->{ParamObject}->GetParamNames();
my $AnotherField = $Self->{ParamObject}->GetParam( Param => 'AnotherField' );
Cheers, Marco