Edit a section's description programatically

  • baileynp
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 35
  • Thank you received: 1

baileynp created the topic: Edit a section's description programatically

Is there anyway to change a section's description text programatically? I've searched through the forums, but to no avail. :(
Regards
#235774
  • Posts: 5789
  • Karma: 118
  • Thank you received: 534

MarioPuco replied the topic: Edit a section's description programatically

Hello,

Can you better describe what do you want achieve ?
As we don't have this feature built in you can always use some jQuery like this example : stackoverflow.com/questions/6411696/how-...e-a-text-with-jquery


Regards,
Mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#235788
  • baileynp
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 35
  • Thank you received: 1

baileynp replied the topic: Edit a section's description programatically

Hi Mario

My form is for students who want to learn English. The first stage is for them to do a self-assessment, using the 5 radio groups, and then I want to be able to display their results in the final section.

If you go to my site here , and click through the radio group options, you'll see that the final section displays a student's assessed level.

I've been playing with textfields and textareas, but it would be cleaner and sexier if I could just add this information to the section's description as formatted text.

Please let me know if you need login access, and I'll enable your account.

Regards

Nigel Bailey

Edit: you'll now see a registration form first - feel free to enter an value you want :)
#235795
  • Posts: 5789
  • Karma: 118
  • Thank you received: 534

MarioPuco replied the topic: Edit a section's description programatically

Hi there,

You can do that of course, I will show you how to change the section text based on previous FORM values.

Go to Advanced properties > More options > Scripts and in the Initialization script set Type to Custom.

function ff_FORMNAME_init(){
setInterval(DescriptionNew, 100);
} // ff_FORMNAME_init

function DescriptionNew(){
ff_getElementByName('.bfLegend-m').tex() =
ff_getElementByName('field1').value() +
ff_getElementByName('field2').value();
)};

NOTE: In the code above you have to replace FORMNAME with the name of your form and adjust element names.
.bfLegend-m is the class name for section heading where you need to merge the rest of the fields.

Let me know how it goes.

Regards,
Mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#235842
  • baileynp
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 35
  • Thank you received: 1

baileynp replied the topic: Edit a section's description programatically

Cool - I'll give that a go later :) Go to go back to work :(
#235846
The following user(s) said Thank You: MarioPuco
  • Posts: 5789
  • Karma: 118
  • Thank you received: 534

MarioPuco replied the topic: Edit a section's description programatically

Hi,

Let me know how it goes out.

Regards,
mario

Satisfied with our Support ?
PayPal Tip
===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
#235850
Moderators: ForumSupporttomeperica
Time to create page: 0.070 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here