I am using ejs template rendering
<%- input_field_tag('inputFld', 5) %>
This code generates input field as
<input id="inputFld" value="" type="5" name="inputFld">
Now I want id and name attribute different
ie. id="inputFldID" and name="inputFldName" also I want to add class attribute.
How should I achieve this?
You are probably looking for
text_field_tag, becausetype="5"doesn't make much sense.You can pass object as third argument to
text_field_tagwith attributes you want to set.