TOPIC:

Copy value in a field of Form A to field in Form B 5 years 1 week ago #188099

  • Topic Author
  • dogungbeje
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 33
  • Thanks: 0
Is it possible to pass the value of the field of form A to a field in form B?

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

Copy value in a field of Form A to field in Form B 5 years 1 week ago #188258

  • tomeperica's Avatar
  • tomeperica
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 6478
  • Karma: 170
  • Thanks: 674
Hey there,

I am sending you 2 forms example below, download it, unzip and install via Package Installer. You will see to forms, Form A and Form B, open Form A and enter some name and submit, it will redirect you to Form B and field Name in Form B will be populated. So here is code that those form contains.

Form A:
Go to Form A -> Advanced tab -> More options -> Submit Pieces -> End submit -> Custom:
$this->execPieceByName('ff_InitLib');
$name=ff_getSubmit('name');
header('Location: index.php?option=com_breezingforms&ff_name=formB&name='.$name);
Here you are submiting the form and storing that value from name element.

Form B:
Has only code in Name Form A element in value field
<?php return JRequest::getVar('name');   ?>
This code will pull out value from URL query which we defined in Form A.

Let us know if that worked for you.

Regards,
Tome
Regards,
Tome
==========================================
Need to renew Pro Support?
Buy Here!
==========================================
Satisfied?
Consider a membership!
==========================================
Like us on Facebook
==========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
Attachments:

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

Last edit: Post by tomeperica.

Copy value in a field of Form A to field in Form B 5 years 3 hours ago #189107

  • Topic Author
  • dogungbeje
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 33
  • Thanks: 0
Thank you so much. It worked.

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

Copy value in a field of Form A to field in Form B 5 years 3 hours ago #189108

  • tomeperica's Avatar
  • tomeperica
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 6478
  • Karma: 170
  • Thanks: 674
Great!

I am glad that solution worked.

Let us know if you need further help.

Regards,
Tome
Regards,
Tome
==========================================
Need to renew Pro Support?
Buy Here!
==========================================
Satisfied?
Consider a membership!
==========================================
Like us on Facebook
==========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!

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

Copy value in a field of Form A to field in Form B 3 years 4 months ago #230572

  • mossi
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 95
  • Thanks: 1
Hi TOMEPERICA ,

This works great. But could you please tell me how do I modify the code if I need to copy values of 3 fields from form A and pass to form B. I have name, lastname and email that I would like to pass to the second form.

Thanks

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

Copy value in a field of Form A to field in Form B 3 years 4 months ago #230577

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5958
  • Karma: 119
  • Thanks: 557
@mossi

Hi,

It's very simple to add more values but you need some programming skill to achieve what you want :
This is the example with lastname element added. Simply repeat the process and you are good to go.

Form A:
Go to Form A -> Advanced tab -> More options -> Submit Pieces -> End submit -> Custom:
$this->execPieceByName('ff_InitLib');
$name=ff_getSubmit('name');
$lastname=ff_getSubmit('lastname');
header('Location: index.php?option=com_breezingforms&ff_name=formB&name='.$name&lastname='.$lastname);

Form B:
<?php return JRequest::getVar('name');   ?>
<?php return JRequest::getVar('lastname');   ?>

Regards,
Mario

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

Last edit: Post by MarioPuco.
  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.140 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!