TOPIC:

reading params in form 8 months 1 week ago #238643

  • Topic Author
  • Balma66
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
Hello,

I created a form for a reservation request. It sends an email with a link and a param to a seccond form.
How to read this param in the seccond form, and loading values from the first form in the seccond?

Feike

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

reading params in form 8 months 1 week ago #238646

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello,

What you want can be easily done.

Go to Properties of the element in your form which you want to fill in with the value of a parameter from the link.
The in the Value field put the following code:
<?php return JRequest::getVar('name'); ?>
NOTE: Replace the name with the name of the parameter in the link.

Let me know whether this is working as you wanted.

Regards,

Mihaela

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

reading params in form 8 months 1 week ago #238663

  • Topic Author
  • Balma66
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
It works, I can read the param.
The second question was How can I get the values from the first form in the second form.

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

reading params in form 8 months 1 week ago #238666

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello,

Great, I am glad that you can read the parameters.

In order to pass values from the first form to the second one (if user is being redirected from one form to another), please take a look at this topic crosstec.org/en/forums/3-breezingforms-f...n-form-b.html#230572 .

Here what you have asked is explained. Basically, reading the params stays the same, you just need to add submitted values from the first form to URL.

Let me know whether you have managed to set this work as you want.

Regards,

Mihaela

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

reading params in form 8 months 1 week ago #238671

  • Topic Author
  • Balma66
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
Ok this works again Thank you.
But is it possible to read the data from a databasse table?

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

reading params in form 8 months 1 week ago #238676

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello again,

Yes it is possible to read from database, but you need to write the correct queries to the database.

The form data gets saved to #__facileforms_records and #__facileforms_subrecords tables.

You would have to go to form's Advanced properties > More options > Form pieces and in Before Form section set Type to Custom and in the code area below put the following code:
$this->execPieceByName('ff_InitLib');
$db = JFactory::getDBO();//Get Database Object
$db->setQuery("SELECT value from #__facileforms_subrecords WHERE element = 7929 ORDER BY id DESC"); 
$tmp= $db->loadResult() + 1;
ff_setValue('FIELDNAME',$tmp);
NOTE: In the code above replace FIELDNAME with the Name of the field in your form. Also, replace 7929 with the element number of the field in your form from which you wish to fetch the values.
This is just an example query that will fetch the last submitted value.
If you wish to fetch value submitted by a specific user you will have to look into the database structure to get the correct queries to retrieve the value, but this is the syntax.

Let me know whether this helped.

Regards,

Mihaela

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

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

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

Summer Sale!

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!