affiliateWise
3 Jul 2012, 12:46 PM
Hey there, I am having some issues wrapping my head around this idea. I would appreciate any help that I can get.
The issue:
I am using Ext.JS 4 and working with a Card Layout. I have the cards all set up and the form complete, what I am trying to do is get the value that the user inputs on the card in the textfield and pass that into my php file that is supposed to hold the variable that corresponds with that input value so that I can pass the php variable within a web query string.
var aff_company_name ={
xtype:'textfield',
id: 'company_name',
fieldLabel:'Company Name',
name:'affiliate[company_name]',
value:'<?php echo $oExtForms->jsEscape($oAffiliate->company_name);?>',
maxLength: 64,
allowBlank: false,
regex: /[a-zA-Z0-9]+/,
blankText:'Enter your company name.',
};
This is what my php class looks like...I have changed it up quite a bit so its not finished
<?php
class affiliate{
public static $aFieldTypes = array(
'affiliate' => array(
'company_name' => 'text',
'address1' => 'text',
'address2' => 'text',
'terms' => 'text',
),
);
const table = 'affiliate';
//Constructor, setup instance
function affiliate($nId=null){
__contstruct();
$this->init($this, self::$aFieldTypes, 'affiliate');
if(!empty($nId))
$this->get((int)$nId);
}
// Query for affiliate by id
public function get($nId){
$this->id = $nId;
$this->getAffiliate();
}
}
?>
If someone could help me figure this out I would greatly appreciate it. Thanks.
Oh and the ext_forms() class just specifies Json_encode.
The issue:
I am using Ext.JS 4 and working with a Card Layout. I have the cards all set up and the form complete, what I am trying to do is get the value that the user inputs on the card in the textfield and pass that into my php file that is supposed to hold the variable that corresponds with that input value so that I can pass the php variable within a web query string.
var aff_company_name ={
xtype:'textfield',
id: 'company_name',
fieldLabel:'Company Name',
name:'affiliate[company_name]',
value:'<?php echo $oExtForms->jsEscape($oAffiliate->company_name);?>',
maxLength: 64,
allowBlank: false,
regex: /[a-zA-Z0-9]+/,
blankText:'Enter your company name.',
};
This is what my php class looks like...I have changed it up quite a bit so its not finished
<?php
class affiliate{
public static $aFieldTypes = array(
'affiliate' => array(
'company_name' => 'text',
'address1' => 'text',
'address2' => 'text',
'terms' => 'text',
),
);
const table = 'affiliate';
//Constructor, setup instance
function affiliate($nId=null){
__contstruct();
$this->init($this, self::$aFieldTypes, 'affiliate');
if(!empty($nId))
$this->get((int)$nId);
}
// Query for affiliate by id
public function get($nId){
$this->id = $nId;
$this->getAffiliate();
}
}
?>
If someone could help me figure this out I would greatly appreciate it. Thanks.
Oh and the ext_forms() class just specifies Json_encode.