TOPIC:

in PDF get value of form element visible to user 10 years 7 months ago #74687

  • nononsense's Avatar Topic Author
  • nononsense
  • Offline
  • Junior Member
  • Junior Member
  • Registered
  • Posts: 70
  • Thanks: 9
I use Breezingforms a lot to generate PDF outputs.

Now for a given radio button element you can fill in agroup with f.e. the following:

1;Yes;50
0;No;0

I use this sometimes to let a javaScript calculate a sum.
But I also have a PDF output for this form.
There I would like to show the user-visible value 'Yes' instead of the value recorded in the database.

Is there a way to do this?

I know:
_FF_DATA_TITLE = element label
_FF_DATA_NAME = element name
_FF_DATA_VALUE = element value

Is there also one for the selected group value which is shown to the user?

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

Re: in PDF get value of form element visible to user 10 years 7 months ago #74921

  • b.nisevic's Avatar
  • b.nisevic
  • Offline
  • User is blocked
  • User is blocked
  • Registered
  • crosstec.org
  • Posts: 658
  • Thanks: 31
Hello nononsense!
I didn't make the BF, so my answer won't be complete.
I understand you want to correct PDF template. As you can see element in $data array is referenced by key for example _FF_DATA_VALUE. You can use php funcions as die(print_r($data)); to check what is in the array or matrix or object. So you will be sure if there is value for your radio button.
I hope this helped. Cheers!
Joomla! Developer
support at crosstec.org

If you use BreezingForms (Free Old Version), please post a rating and a review at the Joomla! Extensions Directory:
extensions.joomla.org/extensions/contact...-feedback/forms/8001

If you use BreezingForms, please post a rating and a review at the Joomla! Extensions Directory:
extensions.joomla.org/extensions/contact...-feedback/forms/4709

If you use ContentBuilder, please post a rating and a review at the Joomla! Extensions Directory:
extensions.joomla.org/extensions/news-pr...t-construction/18048

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

Re: in PDF get value of form element visible to user 10 years 6 months ago #76531

  • nononsense's Avatar Topic Author
  • nononsense
  • Offline
  • Junior Member
  • Junior Member
  • Registered
  • Posts: 70
  • Thanks: 9
referring to the following:

0;Title 1;value1
0;Title 2;value2
0;Title 3;value3

It will show in the form the title. It wil use the value in the database.

I know the value is stored in the database, but I would like to use the Title in the PDF output.
Not the value and not the title (name) of the element itself but the title of the value.

Is that possible? I know how to deal with the rest.

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

Re: in PDF get value of form element visible to user 10 years 6 months ago #76533

  • b.nisevic's Avatar
  • b.nisevic
  • Offline
  • User is blocked
  • User is blocked
  • Registered
  • crosstec.org
  • Posts: 658
  • Thanks: 31
Did you try _FF_DATA_LABEL or $sub->label depending which template do you rewrite.
Joomla! Developer
support at crosstec.org

If you use BreezingForms (Free Old Version), please post a rating and a review at the Joomla! Extensions Directory:
extensions.joomla.org/extensions/contact...-feedback/forms/8001

If you use BreezingForms, please post a rating and a review at the Joomla! Extensions Directory:
extensions.joomla.org/extensions/contact...-feedback/forms/4709

If you use ContentBuilder, please post a rating and a review at the Joomla! Extensions Directory:
extensions.joomla.org/extensions/news-pr...t-construction/18048

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

Re: in PDF get value of form element visible to user 10 years 6 months ago #76684

  • nononsense's Avatar Topic Author
  • nononsense
  • Offline
  • Junior Member
  • Junior Member
  • Registered
  • Posts: 70
  • Thanks: 9
I have used the _FF_DATA_LABEL like below but the output is then empty.

if (count($xmldata)){
foreach ($xmldata as $data) {
switch($data[_FF_DATA_LABEL]){
case 'VPB5': $VPB5 = nl2br(htmlentities(substr(is_array($data[_FF_DATA_LABEL]) ? implode('|',$data[_FF_DATA_LABEL]) : $data[_FF_DATA_LABEL],0,10000), ENT_QUOTES, 'UTF-8')); break;
case 'VPB6': $VPB6 = nl2br(htmlentities(substr(is_array($data[_FF_DATA_LABEL]) ? implode('|',$data[_FF_DATA_LABEL]) : $data[_FF_DATA_LABEL],0,10000), ENT_QUOTES, 'UTF-8')); break;
}
}
}

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

Re: in PDF get value of form element visible to user 10 years 6 months ago #76686

  • b.nisevic's Avatar
  • b.nisevic
  • Offline
  • User is blocked
  • User is blocked
  • Registered
  • crosstec.org
  • Posts: 658
  • Thanks: 31

nononsense wrote: I

There I would like to show the user-visible value 'Yes' instead of the value recorded in the database.

Is there a way to do this?


You can check the value with 'if' statement and swap it with another value which you want.
Regarding $data array these are references which we have:
$data[_FF_DATA_ID]
$data[_FF_DATA_NAME]
$data[_FF_DATA_TITLE]
$data[_FF_DATA_VALUE]
$data[_FF_DATA_TYPE]
Joomla! Developer
support at crosstec.org

If you use BreezingForms (Free Old Version), please post a rating and a review at the Joomla! Extensions Directory:
extensions.joomla.org/extensions/contact...-feedback/forms/8001

If you use BreezingForms, please post a rating and a review at the Joomla! Extensions Directory:
extensions.joomla.org/extensions/contact...-feedback/forms/4709

If you use ContentBuilder, please post a rating and a review at the Joomla! Extensions Directory:
extensions.joomla.org/extensions/news-pr...t-construction/18048

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

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.059 seconds

Support Discord

Join our Discord and enter the Crosstec channels for live-support, chat forums and directly interacting with the community!

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

Subscribe to news and updates!

Special Offer

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!

Live Support Chat Opened!

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