We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Form Fields in Plugin

Development and Programming

BPeddle's avatar
BPeddle
31 posts
14 years ago
BPeddle's avatar BPeddle

Curious if this best pracice in grabbing a form field:

$this->_firstname = $_POST[‘firstname’];

function JobApplication()
 {
  $this->EE =& get_instance();
  $this->data = $this->EE->TMPL->tagdata; 
  
  if ($this->EE->TMPL->fetch_param('id') && $this->EE->TMPL->fetch_param('siteid'))
  {
   $this->_id = $this->EE->TMPL->fetch_param('id');
   $this->_siteid = $this->EE->TMPL->fetch_param('siteid');
   $this->_memberid = $this->EE->session->userdata['member_id'];
   $this->_source = $this->EE->TMPL->fetch_param('source');
   $this->_firstname = $_POST['firstname'];
   $this->_lastname = $_POST['lastname'];
          $this->_email = $_POST['email'];
   $this->_track_job_application();
  
  }
  else
  {
   //return $this->return_data; 
  }  
 }
       
Bhashkar Yadav's avatar
Bhashkar Yadav
727 posts
14 years ago
Bhashkar Yadav's avatar Bhashkar Yadav

this would be best practice to grab form field

$this->_firstname = $this->EE->input->post('firstname');
       
BPeddle's avatar
BPeddle
31 posts
14 years ago
BPeddle's avatar BPeddle

Thank you!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.