CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Feature #4762

Validation via jQuery

Added by Josef Florian Glatz over 3 years ago. Updated about 2 years ago.

Status:Resolved Start date:2009-09-25
Priority:Should have Due date:
Assignee:Alex Kellner % Done:

0%

Category:Frontend Plugin
Target version:Powermail 1.6.0
Votes: 0

Description

I would like to validate the mandatory field with jQuery. More and more websites using jQuery as primary javascript library if there are no special requirement. I can't provide an examplecode, how to implement this.

It would be nice to get this feature in powermail.

powermail_jquery.patch (70.5 kB) Mario Beiser, 2010-01-13 12:02

powermail_4762.patch (94.1 kB) Andy Grunwald, 2010-04-19 15:53

powermail_jquery_4762.patch - Patch uploaded against trunk rev 37104 (94.1 kB) Artem Matevosyan, 2010-08-22 23:01

powermail_jquery_4762.patch - Added localization features to JS file (178.7 kB) Artem Matevosyan, 2010-08-22 23:27

powermail-t3jquery.txt (92 kB) Juergen Furrer, 2011-01-31 21:22

patch-t3jquery-trunk.txt (92 kB) Juergen Furrer, 2011-01-31 22:28

powermail-jquery-2011-02-04.txt (97.5 kB) Juergen Furrer, 2011-02-04 21:13

History

Updated by Rafal Brzeski over 3 years ago

join the above, I think the best solution will allow choice of library for the validation, in this case jQuery

Updated by Mario Beiser over 3 years ago

On a page where jQuery is used the powermail validation and JS tabs (prototype or mootools) conflict with jQuery.

I have attached a patch, which enables the use of powermail with jQuery instead of prototype or mootools. By a new constant "libraryToUse" powermail can be configured to use the jQuery library instead of the prototype library.

libraryToUse = jquery

The patch was writen agianst version 1.5.2 from TER

Updated by Frank Mey over 3 years ago

I support that request - could that patch be integrated firmly into the extension ?
Many developers out there use Powermail but want to stick to JQuery being a fine and actively developed library...

Updated by Alex Kellner about 3 years ago

  • Status changed from New to Accepted
  • Assignee set to Alex Kellner

This is an important issue. Maybe we can use jquery by default (instead of prototype)
what is with t3mootools and t3jquery - a lot of open questions...

Maybe interesting:
http://demos.usejquery.com/ketchup-plugin/

Updated by Andreas Stauder about 3 years ago

I don't like to tell user how he has to fill out fields. Just correct it:
http://www.meiocodigo.com/projects/meiomask/

I don't know how this "library" works together with validation. I just think that validation has to be done after meioMask formated the input. Maybe validation can be done with the callbacks mention for meioMask.

Updated by Mario Beiser about 3 years ago

Hello there,

I think this could be splitted up into two parts of improvements:

1. Enable the usage of central JS libraries
2. Implement a validation method for jQuery

For me it is definitely import, likewise the first step, to include jQuery into powermail core.
As already mentioned, there are a lot of sites running on jQuery Lib.

I think, we should organise the proceeding in this case.
It would be fun to me, to help integrating jQuery into powermail.

Updated by Andy Grunwald about 3 years ago

Hey,

I´ve implemented this feature for a customer.
My patch based on "powermail_jquery.patch" from Mario Beiser, 2010-01-13 12:02.
My patch was build for powermail revision 32313.

The idea from Mario Beiser is very nice to build a process to include EVERY js lib.
I think this is a another feature request, because this might be a bigger task.

My patch makes it possible to include javascript.
This patch is ONLY working with the actually trunk version (min. revision 32313), because #7329 must be fixed for this patch.

It would be nice if you test this patch and write down your opinion / experience.
Thanks.

Updated by Jacco van der Post about 3 years ago

Hi

Ok here my experience. I tried patch 4762 twice, once with 1.5.3 from repository and one time with the latest trunk version. After applying I could indeed choose jquery as library in the constants. However it did not work. The form was invisible because it got a element style invisible. With CSS disabled it still did not do jquery validation. I did not have any other js script or libs loaded.

Updated by Jonathan Uhlmann almost 3 years ago

Hi

I'm working on our new site from our agency, and I solved Powermail with jQuery. I used the validator from jQuery Tools. I also wrote a routine who implements the tabs in a very nice way. You can test it under
http://powermail.louco.ch/

It also whould be great if there could be support for the placeholder attribut. I tweaked our version of powermail (dirty hacking) and now I'm able to check if the user left the Standard value. You can check this behaviour in the Demo, in the third tab.

I would love to contribute a complete Powermail jQuery Extensions. (Not ready jet)
You could call it like this: $('tx-powermail-pi1').powermail();

Updated by Benjamin Mack almost 3 years ago

Any news on this issue? Seems to be critical to finally have jQuery as an option (even if it's just additional and needs more testing, I think).

My previous use cases with powermail, and just to disable JS validation at all when using jQuery without noConflict isn't trivial at all right now.

Updated by Artem Matevosyan almost 3 years ago

I tried the patch from Andy Grunwald, but for me it didn't fork because of error in setting self.form in js/jquery/tx_powermail.js:

self.form = $(form);

chnged to

self.form = $('#' + form);

and it worked. Patch uploaded against trunk rev 37104

The rest works perfect. Thanks Andy!

Updated by Artem Matevosyan almost 3 years ago

Added localization features to JS file

Updated by Andy Grunwald over 2 years ago

  • Target version set to Powermail 1.6.0

Updated by Jacco van der Post over 2 years ago

If possible plz make it possible to use t3jquery, it's very easy to integrate.
If help needed plz contact me.

Updated by Andrea Schmuttermair over 2 years ago

Had lots of handwork to do till patch was running, but now it works.
Detailed description in german about that task can be found here: [[http://www.schmutt.de/234/powermail-mit-jquery/]]

I had also problems with invisible fieldsets. Just delete the first function in tx_powermail.js that tries to create tabs, and then everything works. Even with jQuery 1.2.6!

Updated by Juergen Furrer over 2 years ago

I fixed most of the problems in my patch.
  • Now the TS will include the lib from t3jquery if installed.
  • I hade some problem with other patches, because of sourcopt ext. This problem is fixed in this version too.

I used the tag 1.5.7 version, so this patch should work without problems.

Updated by Juergen Furrer over 2 years ago

Heres the patch for the actual trunk version.

Updated by Juergen Furrer over 2 years ago

Here's the new patch with jQuery 1.5.0

Updated by Alex Kellner over 2 years ago

  • Status changed from Accepted to Resolved

Resolved with a different jQuery Plugin

Updated by Josef Florian Glatz over 2 years ago

Thank you guys for implementing jQuery into powermail!!!!!!!

Updated by Alexander Buch about 2 years ago

Come on guys, are you serious about this?

  • First you kick out any other js framework which might be much more applicable for professional development (indeed, jquery has a bad style).
  • Second you validate by HTML5 attributes which makes my xhtml website fail the validation.
  • Third, yea jquery has a bad code style and you followed it: powermail_frontend.js - line 64: 9 times $(this)..., line 90: at least 9 global variables... great... just great...

I will downgrade

Updated by Alex Kellner about 2 years ago

What the hell?

- First of all we did all the work completely for free; and this was a long way. In addition all decitions were done by a team.
- If you know TypoScript (and I don't think so), you can disable jQuery and use another framework (with more code quality - of course)
- Open your eyes, see how an Extension is working, and change the HTML template by removing all unneeded attributes for your old XHTML page
- If you see a problem in the code, share a new code - Come on and help us by developing for the community
- Feel free to use your own mailform extension
- Don't waste more of my time

shaking my head...

Also available in: Atom PDF