Data listing fields - input element id value not assigned

skittle 15 Jul, 2013
I wanted to use the document.getElementbyID method to apply a datepicker to a Data Listing field (that allows frontend editing) in a Chronoconnection View. After inspecting the input element that appears in my Chronoconnection view with Chrome Developer Tools it is apparent that the id attribute has not been assigned a value. This is the case for all instances of Data Listing fields that appear in the Chronoconnection view. The name attribute has a value but the document.getElementsbyName method is not helpful for my application.

<input type="text" size="25" name="ccfld_MODELID[fieldname][arrayValue]" value="yyyy-mm-dd" id="">


Thanks,

John
GreyHead 15 Jul, 2013
Hi John,

I haven't tried this but you may be able to select these inputs by using the CSS3 'name' selectors (I'm not sure if they will work easily with array names like this though). Or it may be possible to find a parent element and use the child selectors to get the element you need.

Bob
skittle 15 Jul, 2013
Hi Bob,

Thank you for the quick response. I tried solving this using the name selector but was unable to make it work. I will look into solving this with parent and child selectors. Obviously, to use the datepicker I need to add a class to the target element but the preferred method for doing this relies on the id attribute. It is unfortunate the id element is unassigned because this would be very easy to do using the recommended document.GetElementbyId method. While the lack of an id value may not be a true 'bug' it is a definite oversight and limits the flexibility of a powerful Chronoconnection feature.

Any other suggestions (or a code change) would be greatly appreciated.

Thanks again Bob,

John
This topic is locked and no more replies can be posted.