Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8728865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:43:42+00:00 2026-06-13T08:43:42+00:00

I’m Not too sure on what this error is, from looking around, it must

  • 0

I’m Not too sure on what this error is, from looking around, it must be something to do with the database declarations. I’m trying to make a drop down box on my Widget, by selecting different fields of the database, different masks will be selected and will allow for different widgets to be made on later pages.

The part of my code where i think the error is, is:

$this->build("p4a_db_source", "login")
        ->setTable("meetingrooms")
        ->addJoin("login.meetingrooms",
                  "login.meetingrooms.MeetingRoom = login.meetingrooms.MeetingRoom",
                  array('position'=>'Ident'))
        ->addOrder("position")
        ->load();

    $this->setSource($this->login);
    $this->firstRow();
    $this->build('p4a_field','location')
    ->setSource('login')
    ->setLabel('location')
    ->setValue('Please Select...')
    ->setType('select')     
    ->setWidth(60);
    $this->weight->label->setWidth(60);

I know its a similar question to my previous one, but its a different code entirely, but this one should be much easier to fix.
Thanks for the help.

The Stacktrace (Fatal error: Call to a member function getPk() on a non-object in C:\xampp\htdocs\p4a\p4a\objects\widgets\field.php on line 468) isn’t indicating the line at which the error is occurring so i’m unsure where exactly the problem is originating from,

The rest of the code (including previous) is:

class main_dashboard_mask extends P4A_Base_Mask
{
public function __construct()
{
    parent::__construct();
    $this->setTitle("Dashboard");

    $this->build('p4a_field','MeetingRooms');
    $this->MeetingRooms->setLabel("This is the meeting room label");
    $this->build('p4a_button', 'continue')
    ->setLabel('Continue?')
    ->implement("onclick", $this, "change");
   $this->build('p4a_field','booking')
    ->setlabel('Viewing?')
    ->setType('checkbox')
    ->setValue(true);
    $this->booking->label->setTooltip('If you are booking a meeting room, check this box');

    $this->build("p4a_db_source", "login")
        ->setTable("meetingrooms")
        ->addJoin("login.meetingrooms",
                  "login.meetingrooms.MeetingRoom = login.meetingrooms.MeetingRoom",
                  array('position'=>'Ident'))
        ->addOrder("position")
        ->load();

    $this->setSource($this->login);
    $this->firstRow();
    $this->build('p4a_field','location')
    ->setSource('login')
    ->setLabel('location')
    ->setValue('Please Select...')
    ->setType('select')     
    ->setWidth(60);
    $this->weight->label->setWidth(60);
    $this->Meetingrooms();
}

private function Meetingrooms()
{
    $this->build('P4A_fieldset', 'widgetframe')
    ->anchor($this->location)
    ->anchorLeft($this->booking)
    ->anchorLeft($this->continue)
    ->setLabel('Meeting Room Bookings');
}

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:43:43+00:00Added an answer on June 13, 2026 at 8:43 am

    i got it, sorry i was looking in the right place but didn’t see where i was wrong…

    where before the code was ->

     $this->setSource($this->login);
    $this->firstRow();
    $this->build('p4a_field','location')
    ->setSource('login') // <- this is the error(the Pk variable hasn't been set here)
    ->setLabel('location')
    ->setValue('Please Select...')
    ->setType('select')     
    ->setWidth(60);
    $this->weight->label->setWidth(60);
    $this->Meetingrooms();
    

    the fix is ->

     ->setSource($this->login)
    

    Thanks for the assistance =]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a view passing on information from a database: def serve_article(request, id): served_article
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.