Find section name programatically

  • deeplogica
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0

deeplogica created the topic: Find section name programatically

Hi
I need to get the section name of each section from the database, but cannot see where its stored.
I am exporting the data and need the section name along with its elements.

thanks
#238967
  • Posts: 2986
  • Karma: 104
  • Thank you received: 394

mihaela replied the topic: Find section name programatically

Hello,

Section names do not get saved along with the submission.

This piece of documentation crosstec.org/en/support/online-documenta...header-in-email.html might help you achieve what you want.

Regards,

Mihaela
#238989
  • deeplogica
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0

deeplogica replied the topic: Find section name programatically

ok. strange that its not stored? Where is it held if its not stored in the database? It must be saved somewhere?

I have numerous pages and on each page I have a section. under each section, I have numerous questions. I need to be able to know for each question, which section its in.
I dont see how to do this when I save the form?
Is there a way to pick up the name of the section from the form when I save the form ? On the Save form section, I need to make sure that each question gets associated with a section.. I will write my own queries in the database, but how do I trap each question as its being saved?

thanks
#238995
  • deeplogica
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0

deeplogica replied the topic: Find section name programatically

HI.
I am not sure how to get this right - I have numerous pages and for each page I have a section. Under each section I have numerous questions. When I save the form, I need to save the name of the section, even if I can just pick it up from the form itself. Where is the section name being stored if not in the database? It must be stored somewhere! How can I pick up the section name for each question when its saved?


also, I have a drop down box on my form and when I submit the firm, I need to pick up the selected item from the drop down, but its not working.

this is the code
$this->execPieceByName('ff_InitLib'); //Include BreezingForms Library
$db = JFactory::getDBO();//Get Database Object
$user = JFactory::getUser();//Get user Object

****** If I use this then it the insert fails because its not picking anything up from the dropdown
$zzzz = ff_getSubmit('db_project');

******* When I hard code, then the insert works fine
$project_id =1;


//Create your own query
$db->setQuery("insert into active_project (project_id, user_id ) values(" .$project_id ."," .$user->id ." )" ) ;
$db->execute();


thanks
#238996
  • Posts: 2986
  • Karma: 104
  • Thank you received: 394

mihaela replied the topic: Find section name programatically

Hello,

I understand how you want this to work and I have looked at the database, but I am really not sure where are the section names stored.

As for the code to get the 'db_project', you seem to have set everything properly.

So, when you put this code:
$db->setQuery("insert into active_project (project_id, user_id ) values(" .$zzzz ."," .$user->id ." )" ) ;
it is not working?

Can you please send me how you have defined the select list element named 'db_project' so I can see whether it is set properly?

Regards,

Mihaela
#239007
  • deeplogica
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0

deeplogica replied the topic: Find section name programatically

Hi Mihaela
I resolved the one issue - I was putting the code in the after form instead of the after submit - so get_submit code works now

This just leaves the issue of picking up the section name. it has to be stored somewhere, or else it wouldnt be persistent.

thanks
#239008
Moderators: ForumSupporttomeperica
Time to create page: 0.074 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here