TOPIC:

Pre - populating a text element from a Before Form Piece 2 weeks 4 days ago #242864

  • Topic Author
  • rambopierce
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 28
  • Thanks: 0
Hello,

How do you pre-fill in a text element inside a Before Form piece? I know about using php in the Value of the form element, but in this case I had other work to do in a Before Form piece to calculate what I wanted to pre-fill the element with.

I tried the following:

echo '<script type="text/JavaScript">
ff_getElementByName("Secret").value = "BULL";
</script>';

which I thought would put the string "BULL" in the Element named Secret, but it did not work.

thanks,
Richard

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

Pre - populating a text element from a Before Form Piece 2 weeks 3 days ago #242866

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

Please put this code in Before Form pieces:
$this->execPieceByName('ff_InitLib');
ff_setValue("Secret", "BULL");

Let me know if it works for you.

Regards,
Tihana
The following user(s) said Thank You: rambopierce

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

Pre - populating a text element from a Before Form Piece 2 weeks 3 days ago #242882

  • Topic Author
  • rambopierce
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 28
  • Thanks: 0
Perfect! I looked all over for where the methods of the piece 'ff_InitLib' are documented but was unable to find this. Please share that location if you can. Thanks very much for the assistance.

regards,
Richard

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

Pre - populating a text element from a Before Form Piece 2 weeks 3 days ago #242883

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

np, anyway. :)
Also, you can find out more about 'ff_InitLib' in BreezingForms -> Manage Pieces. Init Library are collection of useful functions for use in form pieces.

I hope that help you.

Regards,
Tihana

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

Last edit: Post by tihana.krivic.

Pre - populating a text element from a Before Form Piece 2 weeks 3 days ago #242900

  • Topic Author
  • rambopierce
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 28
  • Thanks: 0
Why yes, there it is! I had created another package for my own pieces and had the drop-down set to my package so all I was seeing was my custom pieces. All I needed to do was select 'FF' in the 'Package:' drop-down list so that I could clearly see the pieces within it including 'ff_setValueX'. Looked all over for that, lol.

thanks again,
Richard

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

Last edit: Post by rambopierce.

Pre - populating a text element from a Before Form Piece 2 weeks 3 days ago #242902

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 233
  • Karma: 3
  • Thanks: 40
Great ! :)

If you didn't do already, please keep us motivated by leaving a small review here:
extensions.joomla.org/extension/contacts...orms/breezing-forms/
(Please turn off your VPN and local Apache prior reviewing as your review might get blocked)

Thanks and regards,
Tihana

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

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

July Sale!

Discounts for all of our extensions + support. Ending July 31st!

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!