TOPIC:

How to set BF Quick Mode Section Title and Description in Initialization script? 11 months 1 week ago #244163

  • Topic Author
  • stuartjbarr
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 27
  • Thanks: 2
Anybody know how to set a BreezingForms Quick Mode "section" (fieldset) title and description in the form Initialization script?

I'm looking for something like
ff_getElement('section_name').title = 'the title';
ff_getSection('section_name').description = 'the description';
Yes, that doesn't actually exist, but I am looking for an equivalent for each.

(I'm trying to make my form a little more data driven, rather than hard-coding these in the section.)

Thanks for any pointers you may have!

Stuart

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

How to set BF Quick Mode Section Title and Description in Initialization script? 11 months 1 week ago #244178

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

you can set title for section in your form->Advanced->more options->Scripts->Initialization Script->check custom->Create code framework and put this:
function ff_NAMEOFFORM_init()
{
jQuery("legend").html("Your title for section"); //here you change title for section
jQuery("#SECTIONNAME p").html("My description here"); //for description 
} // ff_NAMEOFFORM_init
Please replace NAMEOFFORM with name for your form
Please replace SECTIONNAME with name for your section (not title).

Let me know if it works for you.

Regards,
Tihana

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

Last edit: Post by tihana.krivic.

How to set BF Quick Mode Section Title and Description in Initialization script? 11 months 1 week ago #244182

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 808
If you want to address a specific section, then please add the section name to the jquery call:
function ff_NAMEOFFORM_init()
{
jQuery("#SECTIONNAME legend").html("Your title for section"); //here you change title for section
} // ff_NAMEOFFORM_init

Replace SECTIONNAME with the name (not title) of the action.

Unlike elements, the section (and fieldset) names are actual HTML id attributes.

Regards,
Markus

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

How to set BF Quick Mode Section Title and Description in Initialization script? 11 months 1 week ago #244291

  • Topic Author
  • stuartjbarr
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 27
  • Thanks: 2
Hi Tihana, Markus,

Thank you for the code samples.

I've tried this, and no luck, I'm afraid.

To try to isolate this, I created a trivial form with a single section and tried this, but no success. I exported the form and have attached it. I would appreciate it if you could load it and point out my error.

Thank you in advance!

Stuart
Attachments:

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

How to set BF Quick Mode Section Title and Description in Initialization script? 11 months 1 week ago #244294

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

I looked into your form and it works well for Bootstrap theme. You use BreezingForms theme. Then some code changes need to be made.
In initialization scripts put this:
function ff_sectiontest_init()
{
  jQuery("#section1 .bfLegend-m").html("Your title for section"); //here you change title for section
  jQuery("#section1 .bfSectionDescription").html("Write description here"); //for description 
}

Here is image:


Let me know if you need more help

Regards,
Tihana
Attachments:

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

Last edit: Post by tihana.krivic.

How to set BF Quick Mode Section Title and Description in Initialization script? 11 months 1 week ago #244303

  • Topic Author
  • stuartjbarr
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 27
  • Thanks: 2
Yes! That did it!

It makes sense now. :-)

Thank you, Tihana.

Stuart.

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

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