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

The variable associated with model it turns undefined #77

Open
alienriquebm opened this issue Mar 19, 2017 · 0 comments
Open

The variable associated with model it turns undefined #77

alienriquebm opened this issue Mar 19, 2017 · 0 comments

Comments

@alienriquebm
Copy link

alienriquebm commented Mar 19, 2017

Hi my friend, first of all thanks for your excellent work with this plugin. I try to use it on this example:

  1. I want that the user picks a car models from a list when fill a new vehicle information, so i put this for this:

    <select name="modeloMod" selector model="vehiculosc.newItem.modeloMod" options="vehiculosc.modelos" label-attr="modNombre" require="true" placeholder="--Seleccione Modelo--" group-attr="marcaMar.marNombre"></select>

    Well.. this works like a charm... but...

  1. When i try to EDIT the data of a particular vehicle with this another HTML code (on another HTML form):

    <select name="modeloMod" selector model="vehiculosc.selectedItem.modeloMod"  options="vehiculosc.modelos" label-attr="modNombre" require="true" placeholder="--Seleccione Modelo--" group-attr="marcaMar.marNombre"></select>

The vehiculosc.selectedItem.modeloMod turns strangely UNDEFINED!! Im shure that this have a value (i used before a normal select and works peferctly)...

The structure of the vehiculosc.selectedItem.modeloMod is an array of object something like this:

"modeloMod": {
    "modId": 7,
    "modNombre": "CIVIC",
    "modObservacion": "",
    "marcaMar": {
      "marId": 97,
      "marNombre": "HONDA"
    }
}

Im using the config suggested on the page titled "Return entire object(s)"

On my page the dropdown shows the placeholder because the model is now undefined

image

So... can you help me? I am doing something wrong?
Thanks!

@alienriquebm alienriquebm changed the title The variable associated with model it turns on undefined The variable associated with model it turns undefined Mar 19, 2017
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