Hi
I am new to complex coding.
I am trying to add an extra field to a website that is a complex template.
It appears that each field in the sign up form has a php page. Here is the 'Your name' coding that i think is for the form field that is driven through php.
Code:
<?php
class field_i_am extends fieldType_select
{
/**
* Constructor.
*
* @param string $name
*/
public function __construct( $name = 'i_am' ) {
parent::__construct($name);
}
public function setup( SK_Form $from )
{
// TODO: getting values from database
$this->values = array(1, 2, 4, 8);
$this->setValue(current($this->values));
parent::setup($from);
}
}
And the code that calls it:
Code:
<?php
class component_SignUp extends component_FieldForm
{
public function __construct( array $params = null )
{
if (SK_Config::section('profile_registration')->type == 'invite') {
$this->annul();
}
parent::__construct('sign_up');
$this->enable_sections = false;
//$this->cache_lifetime = 10;
}
public function fields(){
return array('username', 'password','email','i_agree_with_tos');
}
}
I think it appears to be a very complex and confusing system.
If someone knows, how would i add a new field to this template in the sign up form? I want to add a 'Surname', and use this current code as listed above as a 'First Name' field.
I'm really baffled on this. Any input would be great!
If you have a thought and would like to see other code from the template then easy, just ask...
thanks
steve