#883: Improved getFieldElements to search the field with the custom selector inside the $form first before looking at the entire document