I have created newsletterpopup with two fields, 'email address' and 'subscriber's name'. And I have made input tag for this both field. So now I want to get the subscriber's name in a variable. How can I do that?
If you want to get value in controller , You can use -
$data = $this->getRequest()->getPost(); $var = $data['input_field_name'];
var inputValue = document.getElementById('input_field_id').value;
Probably you want to get
input values in controller: You can use below code in your controller(which point your POST action):
$data = $this->getRequest()->getPost(); zend_debug::dump($data);