Giter Site home page Giter Site logo

Comments (6)

ReinierGielen avatar ReinierGielen commented on July 23, 2024

Is there any support for radiobuttons or bootstrap buttongroups ?

from xtform.

refactorthis avatar refactorthis commented on July 23, 2024

This is now supported with a data-tooltip-element attribute. You can use this attribute to specify what element the tooltip should show.

from xtform.

ReinierGielen avatar ReinierGielen commented on July 23, 2024

Thanks, I was working with version 0.1 beta but I see the ZIP is updated to 1.0.1.
I think I see the button group being validated in the debugger, but I am not clear on how to use the data-tooltip-element. In the code I see a tooltip-element being handled, but still it's not working.

Do you have an example ? Much appreciated.

from xtform.

ReinierGielen avatar ReinierGielen commented on July 23, 2024

I had an error in my initial data in the field i was using for tests and it is actually data-tooltip-element.
It validates correctly and it places the red border and the tooltip on the desired element.
ONLY after an initial error on my radio-button field the red-border and tooltip are not removed/reset when an value is entered.

from xtform.

ReinierGielen avatar ReinierGielen commented on July 23, 2024

Ok solved it, I added some code to the resetValidity for tooltipElement:

InputValidator.prototype.resetValidity = function () {
    var that = this;
    setTimeout(function () {
        // remove tooltip if needed
        if (that.tooltipSet) {
            that.ngModel.$error.messages = undefined;
            that.element.removeClass('xt-error');
            that.element.tooltip('destroy');
            that.tooltipSet = false;
            that.scope.$apply();
            // allow for a different tooltip element
            if (that.attrs.tooltipElement) {
                that.element = angular.element(document.getElementById(that.attrs.tooltipElement));
                that.element.removeClass('xt-error-container');
            }
        }
    });
};

I hope you can include this in your code.

from xtform.

refactorthis avatar refactorthis commented on July 23, 2024

xtform has been rewritten for 2.0 please try this branch https://github.com/refactorthis/xtform/tree/development or 2.0.0-beta.1 on bower.

from xtform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.