Forums / Developer / "postVariable" names in eZHTTPTool with eZ 4.0
Mickael Robin
Monday 04 August 2008 3:33:10 am
Hi,
for ez 4.0, I'm trying to create a content handler extension thanks to Lukas' blog post http://serwatka.net/en/blog/do_you_need_action to create and feed a Nusoap client after clicking a form button.
<?php include_once( 'lib/ezutils/classes/ezoperationhandler.php' ); function nusoap_export_ContentActionHandler( &$module, &$http, &$objectID ) { $http = eZHTTPTool::instance(); if( $http->hasPostVariable("nusoap_export") ) { // fetch object and read node ID $object =& eZContentObject::fetch( $objectID ); $nodeID = $object->attribute( 'main_node_id' ); // read user variable $sugar_short_name = $http->postVariable( 'Short_name' ); $sugar_long_name = $http->postVariable( 'Long_name' ); $sugar_tel = $http->postVariable( 'Tel' ); } ...
The extension seems to work (as I can create content through the webservice...) but my postVariable are not retrieved (only those fields are blank...)=> <b>how can I know the exact names of postVariables available for eZHTTPTool </b>? So that I can use :
if ( $http->hasPostVariable( "name_of_my_variable" ) ) $my_variable = $http->postVariable( "name_of_my_variable" );
Thanks in advance for your help.
Mickael