I have
class My_Mymodule_Block_Server_Form extends Mage_Payment_Block_Form {
protected function _construct()
{
parent::_construct();
$this->setTemplate('mymodule/form/myinputform.phtml');
}
}
app/design/frontend/base/default/template/mymodule/form/myinputform.phtml
page with following code in it
<dt>
<input type="radio" class="radio" title="<?php echo $this->getmymoduleTitle(); ?>" name="payment[method]" value="SOMESTRANGEVALUE" id="p_method_mymodule" autocomplete="off">
<input type="radio" class="radio" title="<?php echo $this->getmymoduleTitle(); ?>" name="payment[method]" value="SOMESTRANGEVALUE2" id="p_method_mymodule" autocomplete="off">
I can see the two Inputs on the Checkout Page. I want to get the value of this radio input in controller (Where I Post data to payment gateway).
To do the same you have to create a form in the tpl file having a submit button as well.
Set the action for that to anything desired having the path of the controller i.e.
<form action="<?= $this->getUrl('modulename/contollername/action') ?>" id="anyForm" method="post" class="scaffold-form">
Now when you submit this form you will get all the field inside this in the post array of Magento in the action of the provided container.
Please make sure that the input fields are contained inside the form that you are going to add.