Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

name attribute stripping out underscores #300

Closed
jbyington opened this issue Oct 28, 2016 · 1 comment
Closed

name attribute stripping out underscores #300

jbyington opened this issue Oct 28, 2016 · 1 comment

Comments

@jbyington
Copy link

jbyington commented Oct 28, 2016

  /**
   * Make strings safe to be used as classes
   *
   * @param  {string} str string to be converted
   * @return {string}     converter string
   */
  _helpers.safename = function(str) {
    return str.replace(/\s/g, '-').replace(/[^a-zA-Z0-9\-]/g, '').toLowerCase();
  };

safename helper is stripping out the underscores from my name attributes. first_name becomes firstname. the replaceing regex simply needs to account for the _, which it currently doesn't

@bluegaurav
Copy link

bluegaurav commented Apr 6, 2017

Please replace safename function with following code .
return e.replace(/\s/g, "-").replace(/[^a-zA-Z0-9\_-]/g, "").toLowerCase()

kevinchappell added a commit that referenced this issue Apr 18, 2017
* Add browserify, code cleanup

* v1.25.0 WIP

* 1.25.0 WIP

* Bugfix: fast clicking with editOnAdd

* Remove allowSelect from opts.messages

* Only editOnAdd for new fields

* Update gulpfile, getData action, remove bootstrap color styles

* Customizable Form action buttons, clearer selected button styles

* Fix delete toggle element

* i18n WIP, new subtypes WIP

* fieldRender refactor for inline radios and checkboxes and templates

* fieldRender refactor continued

* minor bugfix for getTemplate

* Add Quill support for rich text editing

* Fix tinymce and getScripts caching

* refactor for lower filesize

* Bugfix: disabled tooltip forn appended and prepended fields

* Add mini dom library, working autocomplete

* Fix preview value binding

* update variable

quill WIP

* Upgrade dependencies

* start disabled subtypes, extendable actionButtons WIP, text-overflow for controls

* Minors updates, jsdoc-ing

* stickyControls and Autocomplete field updates

* Bugfix: inputSet drag #368, btnStyle

* Add polyfill for ie11 #365

* Fix ie11 forEach

* Bugfix: Custom class and name attrs #355

* Bugfix: date form-control default class #351

* demo build

* Update icon font label, fix bug where custom classname and name are not used #355

* Fix Custom names, Checkbox field show 2 labels in editor #345

* Update icon font

* Update fonts, stage labels

* HTML labels WIP

* Bugfix: select field multiple options

* Doc updates WIP

* update bower deps

* Module abstraction WIP

* Upgrade packages fix style lint

* Start editorUI render function, Refactor WIP

* fix demo.js

* refactor WIP

* Start new i18n support

* multiple instance refactor WIP

* refactor WIP

* helpers refactor WIP, return promise option for formBuilder

* fix template map issue

* Begin merging checkbox and checkbox-group

* Allow underscore in attribut name 😢, Resolves #300

* Enable custom fields and templates

* fix textarea not saving value

* Add lang files for demo

* fix placeholder strings

* Fix paragraph template, update on toggle edit

* v2.0-beta

* Replace kc-toggle plugin with css only toggle solution (#412)

* Fix control drag issue

* Temporarily remove scrollIntoView(too jarring), autocomplete styling should be available for form-render.css also

* Fix required asterisk, make formData a getter

* Change default lang location

* required asterisk style update

* correct version number

* Enable html labels

* XML options rendering resolves #380

* Button not draggable resolves #378

* XML save updates

* Remove unused strings

* Fix preview layout issue, html labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants