Jump to content

Creating a form in tpl file


Recommended Posts

Hello , 

 

I'm currently working on a small module where i create a form in .tpl and then submit the form into main module php file function.I'm stuck in the part how to link from .tpl form back to module main php file.

 

Here is the code:

 

TPL file

<form action="?????" method="POST" class="form" id="discountForm">
	  <div class="form-group">
	    <label for="email">Email address:</label>
	    <input type="email" class="form-control" id="email">
	  </div>
	  <div class="checkbox">
	    <label><input type="checkbox" name ="discountCheckbox" id="discountCheckbox">{$checkbox_text}</label>
	  </div>
	  <br />
	  <button type="submit" class="{$submit_button_class}">Submit</button>
</form>

I would like to know how to get the action link so i can link back to my module main php file , and how to get the input value ?

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...