Forums

Highlight functionality in a form ?

Mizpah 21 Nov, 2007
Heya all,

Right - now I have some of the basics down, i am trying to thnk through the rest of the form:

I have decided that I want the 'highlight' function as seen here:

(this is a dummy woofu form)

http://enigma.wufoo.com/forms/untitled-form/

As you will see, when you click in the field, it highlights!

Now:

This seem to be controlled by changing this line dynamically, when the field is highlighted:

(when watching it in firebug)

<ul>
<li id="fo2li0" class="">


to


<ul>
<li id="fo2li0" class="focused">


on selectiom.

I assume this is javascript - has anyone any thoughts as to how it might be done ?<br><br>Post edited by: Mizpah, at: 2007/11/20 19:27
GreyHead 21 Nov, 2007
Hi Miz,

Hmm it is JavaScript - buried somewhere in the 2000 lines of dynamic.js.

As you're on Joomla 1.5 the MooTools library is installed, I'd suggest that you look at that. Here's a little MooTools add on to look at.

Bob

Post edited by: GreyHead, at: 2007/11/20 20:51<br><br>Post edited by: GreyHead, at: 2007/11/20 21:08
Mizpah 21 Nov, 2007
:woohoo: It works!!!!:laugh:

As always I was missing the obvious!

Javascript file attached - I will strip some of these functions out later, but I am going to try to get the calander control working as well if I can!

http://www.enigmaguild.org/index.php?option=com_chronocontact&chronoformname=app_form_test

As you will see I am currently building this form up layer by layer now I understand a little more, and trying to keep the code *very* well commented!
GreyHead 21 Nov, 2007
Hi Miz,

Just curious - what did you do to get it to work? Did you use dynamic.js or the MooTools add-on? Or something different?

Bob
Mizpah 21 Nov, 2007
Hi Bob,

I am using the original .js, after getting permission from Kevin at Wufoo.

However I plan to stip the non used functionality out, and add in the customised error checking (the way they show validation errors), and then see how best to use it!

It might or might not end up as moo-tools - depending on how complex it gets!

However if I can come up with somthing that works, people are more than welcome to it! It would also be quite easy to add to any form, just by declaring li.focused in the css, and declaring the list items as 'class""'

Still I have a long way to go yet - but I have now got far enough to be confident that I will eventually win!
This topic is locked and no more replies can be posted.