KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have an input like follows: <input type="hidden" id="attachment-uuids" value=""> I'd like to be able to append a value to the Input, at different times: $('#attachment-uuids).val('55555'); results in: <input type="hidden" id="attachment-uuids" value="55555"> But then doing: $('#attachment-uuids).val('66666'); results in: <input type="hidden" id="attachment-uuids" value="66666"> Where I'd like the following: <input type="hidden" id="attachment-uuids" value="55555, 66666"> how can I append values when the value is empty and when the value is not empty with a comma delimited list? Thanks
Tags (comma-separated)
Save Edits
Cancel