Add the possibility to choose which value will be returned in get_text_val