Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

No Warning for Required Radio 08 Jul 2016 13:25 #14192

Hi Chef,

Using a Enum Radio type field with the required property checked...

If the user does not fill in this required field, the form will not submit - and there is no warning to say what the trouble is. The user usually thinks the form is broken.

Browser: Firefox 47.0
Environment: JCook Sandbox
Buider: Edge
Embed JS: No
Formstyle: Condensed
JDOM:Plugin
Just call me Chris :)

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

No Warning for Required Radio 19 Jul 2016 22:06 #14283

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I see,
Unfortunalely, the form validator cannot handle it.

see the docs here :
github.com/posabsolute/jQuery-Validation-Engine

Otherwise, to fix it, I could implement another form Validator with more features :
bmauser.github.io/bvalidator/

But it works differently.

Moved in New Functionalities.
Coding is now a piece of cake

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

No Warning for Required Radio 16 Aug 2016 13:03 #14449

Any progress on this?

We can't really use radio buttons in JCook without it.
Just call me Chris :)

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

No Warning for Required Radio 16 Aug 2016 13:09 #14451

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
formValidator is already a Cook extra feature that Joomla do not propose, and so I consider it is less important.
There are other priorities at the moment.
Also because I will maybe rewrite it all in future. I am also waiting some volunter to implement a proper good form validator in Joomla.
Can't tell you more at the moment.

I am sure you can find how to hack it, but I tried and it is difficult. So that's why I decided to relay this lower.
You still can use radio buttons with required, but the validation will be done in PHP.
Coding is now a piece of cake
The following user(s) said Thank You: organicwebs

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

No Warning for Required Radio 24 Aug 2016 20:47 #14476

If you check the fieldtypes at www.position-relative.net/creation/formV.../demoFieldTypes.html
The radio is properly validated :)

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

No Warning for Required Radio 24 Aug 2016 20:49 #14477

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Ok, this is correct.
I don't remember now why.
But what about a bootstrap radio field ?

Moved in tickets.

EDIT : But this do not makes the validator more beautifull.
We still have the same problem.

The day I put my hand in, I hope to come out with something nice. I am quite experienced in javascript.
This only thins is that I don't wan't to code a specific Cook plugin. (for many reasons...) so I prefer to implement a well known solution such as this one.

The best would only to redesign it with CSS and jQuery.
At the moment I am doing others things, but I promise you something.
Coding is now a piece of cake

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

Last edit: by admin.

No Warning for Required Radio 24 Aug 2016 20:57 #14479

The problem is that the radios are hidden, only the flat buttons are there.
The validator tries to get the position of the hidden input and fails with an error: jquery.validationEngine.js:1507 Uncaught TypeError: Cannot read property 'left' of undefined on line 1507

When you remove the display:none
.radio.btn-group input[type=radio] {
/* display: none; */
}
the red alert will show up.

So, that validation works. It is only the alert which fails with a javascript :)

edit; remove display:none and replace with opacity:0;
The following user(s) said Thank You: admin

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

Last edit: by Romkabouter.

No Warning for Required Radio 24 Aug 2016 21:00 #14480

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Wonderfull. K++

You see, I don't have much time for that now, but when someone provides the fix, It can be achieved much faster.
In this case, a little hack in the program.. why not ?
Afterall, Joomla proposes a hacked version of bootstrap, I am gonna do the same for this formValidator.
Coding is now a piece of cake

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

No Warning for Required Radio 24 Aug 2016 21:01 #14482

You can remove display:none and replace with opacity:0;
That seems to work for me

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

No Warning for Required Radio 25 Aug 2016 12:21 #14488

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed.

The fix appears in the css files of your component.
I used 'visibility': 'hidden', instead of opacity.

I think opacity is more for graphical rendering, also I found that with visibility it is more relevant.
Coding is now a piece of cake

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

  • Page:
  • 1
Time to create page: 0.074 seconds

  I found "cook" two days ago. Played around with it for a day and then within a day got rid of two legacy applications in IBM Lotus Domino Notes and replaced them with "cook". It was really easy. A piece of cake. Actually it was even easier than cooking. Cooking involves more work than developing with "cook". What can I say about "cook"? Great application great price for what it delivers great forum with a lot of information and fast responses active and friendly community fast forward moving development cycle So what should I say "Monsieur Le Cook"? Keep the good work going it will lead to success. Having become a paying member in the words of Edith Piaf may I say ..... non rien de rien ... je ne regrette rien. Vive La France.
FK (JED)
         

Get Started