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

Mod for field names like "aFieldName[]" for php arrays #3

Open
arkytn opened this issue Aug 1, 2019 · 0 comments
Open

Mod for field names like "aFieldName[]" for php arrays #3

arkytn opened this issue Aug 1, 2019 · 0 comments

Comments

@arkytn
Copy link

arkytn commented Aug 1, 2019

I did make one mod to this for field names of the form "aFieldName[]" for php arrays. I set the clones name to a blank string "" so it doesn't show up in the array.

  Plugin.prototype.initialize = function() {
    var $element = $(this.element);
    $element
    .val($element.attr('value'))
    .clone()
    .removeAttr('id class required')

    .attr('name', '') //so clone doesn't submit. <--Added

    .insertBefore(this.element)
    .hide();
  };
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

1 participant