TOPIC:

Drop down data from mysql 2 months 2 weeks ago #244347

  • Topic Author
  • DeniseChristie
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 51
  • Thanks: 0
Hi,

I have 2 problems:

I successfully show options in select list from MySQL but:

1. When I build a view in Content Builder connected to BF then I can't see the selected options in the view (users that have filled in and submitted). I also pull Name and Surname and email from joomla DB also cant see those in the view.

2. Same when exporting the results...

Can you please assist.

thanx,
Denise

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

Drop down data from mysql 2 months 2 weeks ago #244359

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10063
  • Karma: 167
  • Thanks: 800
Hi,

without knowing your code, if you are using the code in the list definition (not as before form piece), the end of your code you should have something like this
return $list;

to pass the list to CB, use this
$value = $list; // this passes the value to CB
return $list;

Regards,
Markus

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

Drop down data from mysql 2 months 2 weeks ago #244423

  • Topic Author
  • DeniseChristie
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 51
  • Thanks: 0
I use hidden fields for username, name and surname and email. then add this to the value field: <?php echo '</br> Account ID: ', JFactory::getUser()->get('username'); ?>

When you open the form to complete the 3 fields are pulled through but when i view through content builder then those fields are not displayed...

can you help :)

thanx,
Denise

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

Drop down data from mysql 2 months 2 weeks ago #244450

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10063
  • Karma: 167
  • Thanks: 800
Hi,

please use a return and concat using points:
<?php return '</br> Account ID: ' . JFactory::getUser()->get('username'); ?>

Regards,
Markus

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

Drop down data from mysql 2 months 2 weeks ago #244701

  • Topic Author
  • DeniseChristie
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 51
  • Thanks: 0
just a quick question...

with this code how can I make Please select to not have a value when the form is saved?

<?php
$db = JFactory::getDbo();
$db->setQuery("Select * From exce.degree");
$rows = $db->loadObjectList();

$list = "0;Please Select;0\n";

foreach( $rows As $row ){
$list .= "0;".$row->degreecol.";".$row->id."\n";
}

$value = $list; // this passes the value to CB
return $list;
?>

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

Drop down data from mysql 2 months 2 weeks ago #244704

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 1286
  • Karma: 3
  • Thanks: 111
Hi,

Like this:
....
$list = "0;Please Select;\n";
....

Let me know if it works for you

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

Last edit: Post by tihana.krivic.
Time to create page: 0.043 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!