BF TEXTFIELD VALUE (PHP) : Query an element value (summary page)

  • Gilles361
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 154
  • Thank you received: 4

Gilles361 created the topic: BF TEXTFIELD VALUE (PHP) : Query an element value (summary page)

Hi,
I would like to display a "Summary Data Section" on Submit page (before submitting).

1/ I'm planning to create a section with summary "TEXTFIELD elements" = Value (PHP Code) queried from my previous "form elements"

Is it a good way to display this "BF summary page"?

2/ What is PHP Code to query 'Course' element value (from same form)
and pass it in a new TEXTFIELD element Value

I hope you've got my idea...
Thanks, Gil
#234486
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 1938
  • Karma: 67
  • Thank you received: 234

mihaela replied the topic: BF TEXTFIELD VALUE (PHP) : Query an element value (summary page)

Hello,

Usually BreezingForms forms offer option to create summarize elements after submit as explained in this video crosstec.org/en/support/online-documenta...th-summary-page.html and here crosstec.org/en/support/online-documenta...mmarize-element.html .

Since you want to create a "Summary Data Section" on Submit page (before submitting) here are instruction how to do so.

You can not use PHP Code to query 'Course' element value (from same form) because the form values can be fetched by PHP only after submission and before you can much easily fetch them using JavaScript and this function:
ff_getElementByName('elementname').value

What I suggest is that you go to Advanced properties of the any element in that last page with Submit button where you want to display summary. In the Initscript section, set Type to Custom and check the Page Entry checkbox.

Then in the code area below that appears put the following code:
function ff_elementname_init(element, condition)
{
ff_getElementByName('newelementname').value = ff_getElementByName('Course').value;

} // ff_elementname_init

This will copy the value that is entered in "Course" element in the "newelementname" when that page with Submit button is entered.
There you can put code for copying values of other elements as well.

Let me know whether this is what you wanted to know and whether you have managed to make this work for your form.

Regards,

Mihaela
#234493
  • Gilles361
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 154
  • Thank you received: 4

Gilles361 replied the topic: BF TEXTFIELD VALUE (PHP) : Query an element value (summary page)

Hi Mihaela,

Almost, as I would like to display summary "Field" in submit page. BEFORE submitting. They will submit if sumary is OK...

WIth "ff_getElementByName", it seems that 'Course' values is not fetched.
So my summary displays "(hidden) data" default value... Not 'Course' value

I've attched my Test code
Do you have Any suggestion?

Thanks, Gil
#234512
Attachments:
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 1938
  • Karma: 67
  • Thank you received: 234

mihaela replied the topic: BF TEXTFIELD VALUE (PHP) : Query an element value (summary page)

Hello,

Please disregard my previous message, I have checked and you can create all summarize elements on the page of your form that contains SUBMIT button. There all elements will be displayed so user can review the entered data and decide whether he wants to submit or no.

Please just follow instruction from this tutorial crosstec.org/en/support/online-documenta...th-summary-page.html .

Just make sure that on that page where you have a submit button are no other elements other than Summarize elements.

That way you will achieve exactly what you want, if I've understood correctly what you want.

As for the "ff_getElementByName" not working, it will not work for fetching checkbox group or radio group elements values, but since you can use Summarize elements for all that you need, you don't need the other command to get selected values.

If you do, feel free to ask.

I hope it is clearer now how it works.

Regards,

Mihaela
#234531
  • Gilles361
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 154
  • Thank you received: 4

Gilles361 replied the topic: BF TEXTFIELD VALUE (PHP) : Query an element value (summary page)

Hi Mihaela,
I can display all my (fetched) "calculated" Elements in a summary on SUBMIT PAGE.

My element name (not fetched) is 'Data'
In SUBMIT page :
1 - I've created a section : "SummaryData"
1 - I've created a "hidden input" element : "SummaryData" (dummy element)
2 - I've created a "summarize" element named "SummaryData"
in Connect with : "choose SummaryData(SummaryData)"
In Calculate field : value = bfField('Data')

This displays fetched 'Data' Element value / Section in SUBMIT summary, so before I submit my form...

Thanks for your input,...
Gil
#234555
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 1938
  • Karma: 67
  • Thank you received: 234

mihaela replied the topic: BF TEXTFIELD VALUE (PHP) : Query an element value (summary page)

Hello again,

Great! I'm glad that you have managed to display the data as you wanted.

Regards,

Mihaela
#234563
Moderators: ForumSupporttomeperica
Time to create page: 0.048 seconds

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

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€

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!

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