fixed getID function to support id variable

For post_form variables, getId() was not considering `id`. expecting entity_id always. Fixed now.