TOPIC:

Integrator - Code 2 months 1 week ago #264112

  • Topic Author
  • geeksscript
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 117
  • Thanks: 1
Hi,

I hope you're doing well.

I wanted to update a column value in case it is empty after form submission. I used below code in the respective column under Data Integration but it does not seem to work:
if (empty($value)) {
$value = "Default Value";
}
Please guide how can I get it working. Thanks.

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

Integrator - Code 2 months 1 week ago #264128

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

please go to:
/joomlaroot/administrator/components/com_breezingforms/libraries/crosstec/classes
and find BFIntegrate.php file (first make a backup of that file).

Then in line 246 you will see this:
 $value = $item['data'][_FF_DATA_VALUE];
Below that line add:
if (empty($value))  { 
$value = "Default Value";
}

Hope this helps

Let me know the result

Regards,
Tihana

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

Integrator - Code 2 months 1 week ago #264175

  • Topic Author
  • geeksscript
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 117
  • Thanks: 1
Thanks and do I need to keep the code intact in the integrator code section?

Also, would this set "Default Value" for all fields in case they are empty?

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

Integrator - Code 2 months 1 week ago #264177

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

keep the code only in that path from message above :)

And yes, this Default Value will be added for any value if it is empty :)

Regards,
Tihana

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

Integrator - Code 2 months 1 week ago #264181

  • Topic Author
  • geeksscript
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 117
  • Thanks: 1
oh, okay. But I wanted to have default value only on a specific column and that too possibly by code inside the Integrator section. Is that doable?

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

Integrator - Code 2 months 1 week ago #264187

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

I will check that, and come back to you :)

Regards,
Tihana

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

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.047 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!