Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Event Actions on an edit form
-
- Posts: 3
- Joined: Tue Mar 25, 2014 9:43 pm
Event Actions on an edit form
First, I'm a newbie to nuBuilder and a novice at PHP and mysql. That said, I was wondering how I could display the running length of a textarea on an edit form after each character is entered into the field (presumably using the keydown event or an event that makes sense.)? Any direction would be appreciated.
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: Event Actions on an edit form
RGClay,
no PHP or MySQL, but jQuery:
Max
no PHP or MySQL, but jQuery:
- add an html object to your form to display remaining characters in textarea;
- in Javascript tab insert this code:
Code: Select all
function nuLoadEdit() { $('#my_textarea_id').keyup(function () { var max = 10; var col = 'grey'; var len = $(this).val().length; if (len >= max) {var col = 'red';} $('#html-obj') .text(max - len) .css('color', col); }); }
Max
-
- Posts: 3
- Joined: Tue Mar 25, 2014 9:43 pm
Re: Event Actions on an edit form
Thanks for the prompt reply. I'll be trying this first thing in the morning. I've found nuBuilder software to be exceptional! Many thanks to all involved!
-
- Posts: 3
- Joined: Tue Mar 25, 2014 9:43 pm