Here is my form, it looks correct, so this shoulnd't be an issue , I also removed the enctype to make sure it wasn't that.
<form action="<?php echo JRoute::_('index.php?option=com_woo&task=hello.create'); ?>" enctype="multipart/form-data" method="post">
<p>
Project Name :
<input style="width:30%;" name="name" id="name"/>
<input style="display:none;" id="user_id" name="user_id" value="<?php echo $user->id;?>"/>
<input style="display:none;" id="county" name="county"/>
<input style="display:none;" id="state" name="state" />
</p>
<button type="submit" class="btn-green" id="select_county">Create Project</button>
</form>
Inside ControllerHello
public function create()
{
$jinput = JFactory::getApplication()->input;
$foo = $jinput->get('state', '', 'filter');
print_r($foo);
die;
}
Returns "NULL"
Any ideas?
You can try this -
$input = JFactory::getApplication()->input;
$post_array = $input->getArray($_POST);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With