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

View form value

How Do I?

devraed's avatar
devraed
1 posts
10 years ago
devraed's avatar devraed

Hi I’m new to exp and i have caret plugin for custom form and i went to view the from after the user submit the form.

Thanks Raed


<?php // if (! defined(‘BASEPATH’)) exit(‘No direct script access allowed’);

$plugin_info = array ( ‘pi_name’ => ‘Input’, ‘pi_version’ => ‘0’, ‘pi_author’ => ‘…’, ‘pi_author_url’ => ”, ‘pi_description’ => ‘…!’, ‘pi_usage’ => Input::usage() );

class Input { public $return_data = ”;

function __construct() { $this->EE =& get_instance(); $this->EE->load->helper(‘form’);

$this->return = $this->current_url(); $this->tagdata = $this->EE->TMPL->tagdata; }

public function field($type=”“,$value=”){ $type =ee()->TMPL->fetch_param(‘type’); $value =ee()->TMPL->fetch_param(‘value’); //$fromId =ee()->TMPL->fetch_param(‘fromId’);

if ($type == “form”){ $return_data = “<form action=”.$type.” method=’post>”; return $return_data; }elseif ($type == “text”){ $return_data = “<input type=”.$type.” value=”.$value.”>”; return $return_data; }elseif ($type == “select”){ $return_data = “<select name=” >\n “.”<option value=”>….</option>\n”.”</select>\n”; return $return_data; }elseif ($type == “submit”){ $return_data =”<input type=’submit’ value=”.$value.”>”; return $return_data; }elseif ($type ==”post”){ //$this->EE->input->get_post($value); //$type =ee()->TMPL->fetch_param(‘value’); $return_data = ee()->input->get_post(‘value’); var_dump($return_data); return print $return_data; }elseif ($type == “closFrom”){ $return_data =”</form>”; return $return_data; }else { print “there ara an error”; }

}

public function output(){ //$this->EE->load->helper(‘form’); //$value = ee()->input->post(‘value’); $value = ee()->TMPL->tagdata; var_dump($value); return $value; } public static function usage() { ob_start(); ?>

test <?php $buffer = ob_get_contents(); ob_end_clean(); return $buffer; } }
/* End of file pi.input.php / / Location: ./system/expressionengine/third_party/input/pi.input.php */

       

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.