Has anyone hacked the form builder to allow javascript to be added to the resulting fields? For example; say I wanted to add an onClick action to an input field. It would add greatly to what we now have for building forms.
Has anyone hacked the form builder to allow javascript to be added to the resulting fields? For example; say I wanted to add an onClick action to an input field. It would add greatly to what we now have for building forms. Geeks, making the world a better place |
I am having trouble selecting elements on the join from from javascript added to the join form; anyone worked with this before? Geeks, making the world a better place |
What about this, can anyone tell me the files I need to hack up in order to expand the form builder to allow to add javascript actions to the builder so that I can add such things as onclick? Geeks, making the world a better place |
Why don't you use jquery and embed your jquery code in page. It has nice css like selectors. so much to do.... |
Why don't you use jquery and embed your jquery code in page. It has nice css like selectors. Well, that is what I wanted to do. Looking at the source view of the join form, there is no id added to the fields and we can not use class names; so I attempted to use document.getElementsByName(); looking at a source view I see names as name="widgets[0]" and getElementsByName() returns an array of all the elements on the page with that name. So far my code test is not working. I need to do some validation on some fields after the fields lose focus; so as the user enters data in a field, when they move to the next field, I do a check using onblur. My test code was just trying to see if I could change the value in the field after the user move off the field; I tested the code on a code testing site and it worked there but not when added to the form. So I am not sure why; the code was javascript and not jquery although I tested jquery using the equivalent form for testing an element by name. If you look at code, you will see that getting elements by ID is the preferred method; just about all the jquery out there will be testing on the ID. If we could assign IDs to fields then it would make it a lot easier for doing things with our forms before we submit the form for validation. Geeks, making the world a better place |
It's very complex. I did it for the admin options form in my facebook connect module. You can see screen shots of that form in the market entry for it. https://www.deanbassett.com |
Thanks Deano; much appreciated the insight into what would need to be done. One of the things I wanted to accomplish was to do some client side manipulations before the form was submitted and values stored in the database; this was a request from someone and I may have to rethink this. Geeks, making the world a better place |
Just got finished looking over the form builder script; yes, rather a lot going on; made me head hurt it did. Geeks, making the world a better place |
Just got finished looking over the form builder script; yes, rather a lot going on; made me head hurt it did.
https://www.deanbassett.com |