Adding attribute name/values from selector when automatically creating elements on the enter selection