TOPIC:

Read-only Textarea 5 years 2 months ago #211450

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5957
  • Karma: 119
  • Thanks: 558
HI,

1 ) to make a element 'readonly' go to your element advance options and enable "Readonly" option.

OR In advance options from this element go to :
Initscript > Custom > check "Form Entry" > Press "Create Code framework and add this within the code framework :
document.getElementById("myTextArea").readOnly = true;

Regards,
Mario

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

Last edit: Post by MarioPuco.

Read-only Textarea 5 years 2 months ago #211501

  • johanjaimes
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 5
  • Thanks: 0
Hi Mario, thanks for your answer. This is what I did but its not working:




Any suggestion about what am I doing wrong?

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

Last edit: Post by johanjaimes.

Read-only Textarea 5 years 2 months ago #211503

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5957
  • Karma: 119
  • Thanks: 558
Hi,

Use your browser to get this elements ID and replace it in the code below
(#ff_elem6) afterwards paste this script to your site:
function ff_protecciondatos_init(element, condition){
jQuery("#ff_elem6").prop('disabled', true);
} // ff_protecciondatos_init

Let me know if this works.

Regards,
Mario

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

Read-only Textarea 3 years 11 months ago #232937

  • dmitri
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 85
  • Karma: 1
  • Thanks: 2
After several tests I got to most easy solution, initscript for element should be like this
function ff_FieldName_init(element, condition)
{
element.readOnly = true;
}
For some reason ff_getElementByName("name-of-textarea").readOnly = true; doesn't work for me.

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

Read-only Textarea 3 years 11 months ago #232938

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5957
  • Karma: 119
  • Thanks: 558
Hey there,

For me it's working w/o any problem.
I tested it with :
jQuery("#descrip").prop("readonly",true);
jQuery("#descrip").prop('disabled', true);
element.readOnly = true;

Maybe you need to check "Form Entry" and "Page Entry" above.



Regards,
Mario
Attachments:

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

Read-only Textarea 2 years 5 months ago #244057

  • rambopierce
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 39
  • Thanks: 0
I had a really hard time getting any method to work to make my textarea element read only. The rookie mistake that I made was that I had named my Page, Section, and Element the same name. When I gave the element a unique name, your simple solution worked like a champ. I wonder if ff_getElementByName was confused by the name clash as well. Hope this helps someone.

regards,
Richard

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

Moderators: ForumSupport
Time to create page: 0.107 seconds

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

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!