Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Formly Form is creating invalid html element ids #584

@funktioneer

Description

@funktioneer

Example input field auto generated by formly form:

<input ng-model="model[options.key]" type="text" data-error-container="#AngularBarcode_title" id="cs.form_qrinput_facebook_url_2" name="cs.form_qrinput_facebook_url_2" formly-custom-validation="" ng-model-options="options.modelOptions" required="true" pattern="^http://|(www.)?[a-z0-9]+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?" placeholder="http://www.qr-code-generator.com" class="ng-pristine ng-invalid ng-invalid-required ng-valid-pattern ng-touched">

As you can see the id contains a dot: id="cs.form_qrinput_facebook_url_2"

if you try to access this id with
jQuery("#cs.form_qrinput_facebook_url_2");
you won't get the element

How can we solve this isssue?

Best,
Nils

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions