lundi 11 avril 2016

Laravel get input of dynamic created div

I have created input elements using javascript, looks like this:

...
for(var i = 1; i<slider.value; i++) {
          +'<div class=\"input-group\">'
             +'<input id=\"input-chapter-start'+i+'\" type=\"text\">'
          +'</div>'
}

Now I am trying to get these dynamic created input ids in my model.

My Model looks like this so far.

protected $fillable = ['email', 'title', 'filename'];

My problem is now how to properly get the ids in the array.

I could not run something like this.

    protected $fillable = [
                    'email',
                    'title',
                    'filename',
                    for ($i=0; $i < ; $i++) { 
                        # code...
                    }
                    ];



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire