Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Cloned Select Boxes don't update #96

Closed
peterloo opened this issue Oct 27, 2010 · 4 comments
Closed

Cloned Select Boxes don't update #96

peterloo opened this issue Oct 27, 2010 · 4 comments

Comments

@peterloo
Copy link

Let me preface this by saying I am below novice level when it comes to jquery or any kind of javascript programming. So forgive me if I ask a few "duh" questions. I may need to be handheld a bit.

I am working on a form that uses a multiple field extender script that clones form elements. When the user clicks to add in a new set of cloned form elements, particularly cloned select boxes, the options can be selected but do not update in the actual select box after a selection is made. I know the multiple field extender script works because it works fine if I disable Uniform. How do I get this to work so that cloned select boxes display what is selected? I really like Uniform and I don't want to go back to the ugly default form.

Here is where my work in progress form is - http://www.pentco.com/order.php
Help?

@pixelmatrix
Copy link
Collaborator

Hey Peter,

What you need to do is call Uniform on the new selects that are generated. Uniform cannot detect newly created form elements.

As it is right now, Uniform doesn't work well to be called twice on elements (preventing you from just calling $("select").uniform() again), but in 2.0 which will be released pretty soon i've made it possible to do that without issue.

@peterloo
Copy link
Author

Thanks for the reply. And for the great form skinning plugin...but now I have to get it to work with my own form situation...

Sorry, but I'm not sure how I call Uniform on the new selects. Where and what code would I place in my form?

If the 2.0 comes out, this will be all moot correct? When is 2.0 coming?

Peter

@pixelmatrix
Copy link
Collaborator

Hey peter,

Ideally in the plugin that lets you clone selects it would return the newly created select object to you somewhere. You could store that as a variable, and then call $(newSelect).uniform(); for example.

In 2.0 all you'd need to do is call $("select").uniform() and it will ignore the already "uniformed" elements.

2.0 has been mostly written, but it needs testing. I am spending my weekends working on it currently. Probably 1-2 weeks out still. There is a beta version you can use at your own risk if you switch to the "refactor" branch of this project.

@Relequestual
Copy link

For anyone googling for this issue (like I was), it has become an opened issue again with a workaround to solve the problem found here #340

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants