TOPIC:

Dynamic select list from db 11 years 2 days ago #11198

  • Topic Author
  • beaureef
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 24
  • Karma: 1
  • Thanks: 0
Hi all,

Evaluating BreezingForms, I have come across a problem which I cannot seem to get past - that of creating a dynamic select-list populated from a custom table in my Joomla database (jos_z_counties) using QuickMode.

I've tried all sorts and as a control experiment copied and pasted the code from one of the sample forms (Embedded php code - userlist element- 'options' text area parameter) into the 'List' text area parameter of a select-list element of my QuickMode form.

Code copied.

1;Select user;none
<?php
/*
This php code is executed while the page is created.
It queries the userlist by sql and creates options for the select list.
*/
$users = ff_select("select name, username from #__users order by name");
$options = '';
if ($users)
foreach ($users as $user)
$options .= "0;$user->name;$user->username\n";
return $options;
?>

End of code copied.

I only get the selection that is described by the '1;Select user;none' line i.e. 'Select user'.

The odd thing is that when I open the sample form (Embedded php code) to edit it, the userlist field populates OK with all my users showing correctly, proving that the code in that mode works (presumably Classic Mode).

I am missing something so any help would be appreciated.

Thanks in advance.

Please Log in or Create an account to join the conversation.

Last edit: Post by beaureef.

Re: Dynamic select list from db 11 years 2 days ago #11204

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 807
Hi,

I found the problem and maybe got a solution for you.

But I need to know what BF build you are using right now.

Regards,
Markus

Please Log in or Create an account to join the conversation.

Re: Dynamic select list from db 11 years 2 days ago #11219

  • mygunfriday
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 4
  • Thanks: 0
I'm having a similar problem. This code isn't working.
I'm using BF 1.7.0 Build 726
My form is a Quick Mode Form.

Please post a solution.

Thanks in advance,

Jeremy

Please Log in or Create an account to join the conversation.

Re: Dynamic select list from db 11 years 2 days ago #11227

  • Topic Author
  • beaureef
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 24
  • Karma: 1
  • Thanks: 0
TheMuffinMan wrote:

Hi,

I found the problem and maybe got a solution for you.

But I need to know what BF build you are using right now.

Regards,
Markus


Hi Markus, I am evaluating on BF 1.6.5 (build 725 - Trinity) at the moment - this tool looks like it is on the verge of being very good indeed - once the full documentation comes out then I think it will be very popular.

Thanks for replying and I look forward to hearing from you so I can continue on.

Please Log in or Create an account to join the conversation.

Last edit: Post by beaureef.

Re: Dynamic select list from db 11 years 2 days ago #11230

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 807
Hi,

for BF 1.6.5 (build 725 - Trinity), please unzip the file attached and copy it to

/administrator/components/com_facileforms/libraries/crosstec/classes/

Then the select field should accept php as well.

If a BF 1.7.0 user needs it too, please let me know. It is already built into the 1.7.1 branch but I cannot release it right now.

File Attachment:

File Name: BFQuickMod...0118.zip
File Size:8 KB
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: Post by TheMuffinMan.

Re: Dynamic select list from db 11 years 1 day ago #11231

  • mygunfriday
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 4
  • Thanks: 0
Quote:
"If a BF 1.7.0 user needs it too, please let me know. It is already built into the 1.7.1 branch but I cannot release it right now."

Yes. I need something to let the code work. Will this file work for me?
BF 1.7.0

The code in this file looks very different from my current file...

Thanks again,

Jeremy

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.052 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!