TOPIC:

Get field value from other field 1 month 3 hours ago #272969

  • Topic Author
  • phs.oth1
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 3
  • Thanks: 0
Hello,

I'm new in using breezingforms. I'd like to know if it's possible to do the following forms :

| A : _____________
| button B
| C : _______________
| Default_Form_Send_Button
The cinematics i would have to have is the following :
The user populate the field A and then click on the button B. Then the field C will be populate by a piece (get some data from a database) with a value and the value can be modified by the user and saved into database.

I have the following issues :
- when in a piece (none type) i do a ff_getSubmit('A') (into value of field B or into after form piece), the value return by function ff_getSubmit is always empty (even if i do $this->execPieceByName('ff_initLib');)
- into form properties, i try to do some echo 'foo/bar' into 'send pieces', but i can't see nower my echos
- when clicking on the button B, it don't seems possible to call a piece script. Only a script seems possible to be call ?


Does someone have always solved this kind of issue ?
Regards
Philippe

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

Get field value from other field 4 weeks 1 day ago #272978

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

basically, yes.

User can fills field A, and click on button B (this can be e.g. next button), and then we can populate field C from database.

Add field A, and add custom submit button on Page 1.
Go to this custom submit button->Advanced->Actionscript->check Library->check Change->and from library select script ff_nextpage().

If you want to populate field C from database then please check this documentation:
crosstec.org/en/support/online-documenta...-fields-from-db.html

Please adjust this part of code:
$db->setQuery('Select name From #__users Where id='.$user->id); 
select column which you want to show and from which table :)

If you get in stuck let me know

P.S: if you want that user can modify entries, please enable"submission editable by user" in the BF menu item or module item settings (depending if call the form using a menu item or a module).

For this the users need to be logged in. That's all they they need to do.

Once they re-open the form again after the first submission, their old entries should appear, and user can continue filling out the form.

Regards,
Tihana

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

Get field value from other field 4 weeks 18 hours ago #273084

  • Topic Author
  • phs.oth1
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 3
  • Thanks: 0
Hello Tihana,
Thanks for the answer.
My need is a quite different.
I need that the value entered by the user into field 'A' is used in the query which would be : select field1 from mytable where id = <value_of_field_A>;
I don't see how to send the value from field 'A' to the query as the ff_getSubmit returns null.
Do you know how i can do that ?
Regards

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

Last edit: Post by phs.oth1.

Get field value from other field 4 weeks 7 hours ago #273092

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

one question:
user populate field A, then field C should be populate with this value from database?

For this form should be already submitted otherwise in database will not be saved value of field A.

The query for this:
$db->setQuery('SELECT MAX(value) From #__facileforms_subrecords Where name="nameoffieldA" ');
This will show the latest value of field A, please replace nameoffieldA with name of field A (not title)
To populate field C with this use the same code as in documetation :)

If you get in stuck let me know

Regards,
Tihana

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

Get field value from other field 3 weeks 5 days ago #273160

  • Topic Author
  • phs.oth1
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 3
  • Thanks: 0
Thanks for your answer. I will try it.
Regards
Philippe

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

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