TOPIC:

Question urgently: Where is the file path of this submit button? 1 year 1 month ago #236871

  • Topic Author
  • magicican
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Hello, Dear Administrator. I have a problem and need help urgently.

Well, I used the BreezingForms component in the ContentBuilder component, and then I wanted to know where the "submit button" file for that form was when the ContentBuilder component modified the BreezingForms form. I want to do some PHP development for this submission event. The submission button is shown in the figure below. Thank you, thank you very much, and salute you!
Attachments:

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

Question urgently: Where is the file path of this submit button? 1 year 1 month ago #236878

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

That submit button in Content Builder view is actually the submit button from the form which you see when you submit the form in BreezingForms.

What you could do is you could add an action to form's Advanced properties > More options > Submit pieces in the "Begin Submit" or "End Submit" section depending on when you want the action to perform. There you can add PHP code.
You can read more about it here crosstec.org/en/support/online-documenta...ript-and-pieces.html .


Another way that you can add action directly to the submit button is the following. Note that this way you will be able to write JavaScript code, not PHP. You can create a custom submit button in the form instead of the regular one and add to it the action wanted.

To do so, you have to do as follows:
1) Go to your form's Properties and set Include submit button to No. That will remove regular submit buttons.

2) As last form element create new element of "Submit button" type. What you write in the Value field for that button element is what will be displayed on that button in your form, so that it the place where you should put, for example, "SUBMIT" since this button will use to submit the form.

3) Go to Advanced properties of that next button element and in Actionscript section set Type to Custom and mark Click as Action.

4) Create a code framework and put there JavaScript code to perform the action wanted when the submit button is pressed.

Let me know whether you have managed to make your form work as wanted after submission.

Regards,

Mihaela
The following user(s) said Thank You: magicican

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

Question urgently: Where is the file path of this submit button? 1 year 1 month ago #236906

  • Topic Author
  • magicican
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Dear Administrator, Thank you for your reply!

I just tried your method. I turned on advanced settings in the BreezingForms form and added custom code to insert MySQL database in the Submit pieces option. As shown in the figure below, now when I submit the form, the insert database code I wrote in the Submit pieces actually takes effect. Thank you very much.



However, there is a problem now that I am writing insert statements for drafting data temporarily. I want to convert the values submitted by component fields in BreezingForms form into PHP variables and insert them into my insert SQL statement. I wonder how PHP can get the field contents in BreezingForms form and convert them into variables. Also, I would like to ask the respectful administrator to give me some advice. Thank you very much. Salute and thank you and your team.
Attachments:

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

Question urgently: Where is the file path of this submit button? 1 year 1 month ago #236907

  • Topic Author
  • magicican
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Dear Administrator, Thank you for your reply!

I just tried your method. I turned on advanced settings in the BreezingForms form and added custom code to insert MySQL database in the Submit pieces option. As shown in the figure below, now when I submit the form, the insert database code I wrote in the Submit pieces actually takes effect. Thank you very much.



However, there is a problem now that I am writing insert statements for drafting data temporarily. I want to convert the values submitted by component fields in BreezingForms form into PHP variables and insert them into my insert SQL statement. I wonder how PHP can get the field contents in BreezingForms form and convert them into variables. Also, I would like to ask the respectful administrator to give me some advice. Thank you very much. Salute and thank you and your team.

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

Question urgently: Where is the file path of this submit button? 1 year 1 month ago #236908

  • Topic Author
  • magicican
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Dear Administrator, Hello, I have returned the reply to you, just in this topic, because I don't know how to @ you, so I responded to this topic alone, but also ask the Administrator you see my reply help guide, thank you! Salute!

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

Question urgently: Where is the file path of this submit button? 1 year 1 month ago #236909

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

I'm glad that the code is now properly executed when you have put in in the End Submit pieces.

Here are instructions on how to get values submitted in the form as PHP variables and use them in an SQL statement.

As explained here crosstec.org/en/support/online-documenta...ript-and-pieces.html , you can retrieve submitted values the following way:
$this -> execPieceByName('ff_InitLib');
$field1 = ff_getSubmit('FIELDNAME1');
$field2 =ff_getSubmit('FIELDNAME2');
NOTE: You have to replace FIELDNAM1 and FIELDNAME2 with the Name of the field from which you wish to fetch the values.

Let me know whether this answers your question.

Regards,

Mihaela

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

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