Working with 'edit.ejs' in a simple 'CRUD' application, I changed the
'update' button type from 'submit' to 'image' (with a src attrib). Now
when I update, an extra empty attribute gets added to the Model. If I
give this image input a 'value', then this value gets added to the
Model. When I also do this to the 'cancel' link, I get two extra
attributes/fields added to the Model instance.
So its like all inputs which are not of type 'submit' get added to the
Model, so I guess I need to extend somewhere to exclude image inputs
for this. It's a little funny because image inputs don't normally
appear as fields in an HTTP POST, but sure do here.
Am I not supposed to use image inputs is EJS templates?
Sent from my iPhone
> --
>
> You received this message because you are subscribed to the Google
> Groups "JavaScriptMVC" group.
> To post to this group, send email to javasc...@googlegroups.com.
> To unsubscribe from this group, send email to javascriptmv...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/javascriptmvc?hl=en
> .
>
>
if(el.type && (el.type.toLowerCase()=='submit' || el.type.toLowerCase
()=='image')) return;
On Dec 22, 1:31 pm, Justin Meyer <justinbme...@gmail.com> wrote:
> It's not ejs. It's form params. It should be removing image button
> types.
>
> Sent from my iPhone
>