Hello all, I'm trying something on a NetSuite form...
# suitescript
d
Hello all, I'm trying something on a NetSuite form where a JQuery function is updated an input value. It works fine .. however, when I submit that form, the POST doesn't see that updated value. Is there a way to ensure 'dynamically added values persist to the POST event?
b
share the code
but keep in mind that there are elements used for display, and elements used in the form
d
NOt optimized, but here's where I'm at
I'm trying to create a 'list' of type/value inputs. User can add/delete these input pairs.
Basically trying to implement this ... http://jsfiddle.net/sna2stha/u3cFq/
b
is the internal id of the field custpage_origin_refnums_data
a
On an unrelated note can you please tell me how you shared your code?
d
Yes, its 'custpage_origin_refnums_data' .. I see what you mean .. there is another identical element with that name
But, for some reason, jQuery selector only grabs the first one
b
depends on the field type, but netsuite's dom is a mess and not all the ids are unique
jQuery assumes the document is valid
a
@darrenhillconsulting
d
@Alan Fitch
a
When I share my code it's all weird but when you share it it comes up with a neat little header that you can click in to.
d
Ya, @battk sent you a link
a
Ah I see. Thank you.
b
if you are seeing duplicate elements, you can try directly using document.querySelectorAll