We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

trying to create a plugin | Forum

Jan
Jan Jul 28 '15
im wondering if someone can help me im trying to build a escort booking system using the skeleton i have custoomised the form files and i have come across the following error

Fatal error: Call to undefined method OW_Language::firstname() in /home/jktempla/public_html/fabcouples/ow_plugins/booking/classes/form.php on line 14

Heres the code for the section in error

class BOOKING_CLASS_Form extends Form
{
    public function __construct( $name )
    {
        parent::__construct($name);
       
        $language = OW::getLanguage();
       
       
        //Simple text field
        $firstname = new TextField("firstname");
        $firstname->setLabel($language->firstname("booking", "forms_text_field_label"));
        $firstname->setDescription($language->firstname("booking", "forms_text_field_description"));
        $firstname->setHasInvitation(true);
        $firstname->setRequired();
       
        $this->addElement($firstname);

What is causing this jan x
Elly Dzilah
Elly Dzilah Jul 30 '15
The $firstname is a variable, not a method of the OW::getLanguage() object.
OW::getLanguage() does not have any method called firstnam().

What you have to do is, use $language->text('booking', 'forms_text_field_label');
instead of $language->firstname("booking", "forms_text_field_label")