TOPIC:

ContentBuilder : Export "State and Published status" in XLS file 3 years 9 months ago #219338

  • marinkosevo's Avatar
  • marinkosevo
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 747
  • Karma: 27
  • Thanks: 92
Okay, I will look into it.

Best regards,
Marinko

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

ContentBuilder : Export "State and Published status" in XLS file 1 year 2 months ago #246809

  • dfloresc
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 20
  • Thanks: 0
Hi crosstec guys,

This topic help me but I found an issue. I need to export the state of different views.

I have many views of the same BF form and more than one has states activated, so I was looking into the code and I try to use on the query another field without success. Could you help me with the right name of the field, please?

This file locate on misite\administrator\components\com_contentbuilder_views\export\tmpl\default.php

on line 57
$sql = "SELECT title, color FROM `#__contentbuilder_list_states` WHERE id = (SELECT state_id FROM `#__contentbuilder_list_records` WHERE record_id = $item->colRecord and form_id = $this->_id)"; // Select data from DB

I try with:
$this->data->_id
$this->data->form_id
$this->data->contentbuilder_form_id
$this->id
$this->_id
$this->form_id
$this->contentbuilder_form_id
$this->element->form_id

None of them works.

Hope you can help me.

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

Last edit: Post by dfloresc.

ContentBuilder : Export "State and Published status" in XLS file 1 year 2 months ago #246883

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

please try

$contentbuilder_form_id

I think from within the context you are trying to get the data this would give you the right ID.

Regards,
Markus

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

ContentBuilder : Export "State and Published status" in XLS file 1 year 2 months ago #246895

  • dfloresc
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 20
  • Thanks: 0
Thanks for answer, but it doesn't work. Any other idea maybe?

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

ContentBuilder : Export "State and Published status" in XLS file 1 year 2 months ago #246978

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 808
Hmm, I got an output using $this->form_id at least when I debugged it.

Can you please do this in the defaul.php in the beginning:
echo $this->form_id;
exit;

It should show you a blank page when clicking XLS export with the actual ID.

If it displays the ID like it does for me it would mean the query itself doesn't return values.

Regards,
Markus

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

Last edit: Post by TheMuffinMan.

ContentBuilder : Export "State and Published status" in XLS file 1 year 2 months ago #247014

  • dfloresc
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 20
  • Thanks: 0
Many thanks TheMuffinMan,

It works with this:

.intval($this->data->form_id).
$sql = "SELECT title, color FROM `#__contentbuilder_list_states` WHERE id = (SELECT state_id FROM `#__contentbuilder_list_records` WHERE record_id = $item->colRecord and form_id = ".intval($this->data->form_id).")"; // Select data from DB

Now, I found another issue in the code, when I define State hex color that began with letter or cero it doesn't set up the right color on the cell, it set the color with the default CCCCCC, so I make this change, and works perfect, until now.
if($result[1] < '000001') $result[1] = 'CCCCCC';

It was $result[1] < 1

I don´t make any change in Publish, because I don't use it, but I think this could help someone else. I attach the file that I use.

Great Crosstec team, many thanks.



File Attachment:

File Name: default.zip
File Size:2 KB
Attachments:

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

Last edit: Post by dfloresc.
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!