I want to have a field in a custom Doctype that performs the following task:
List all registered customers in the system and offer the possibility of using a user-defined customer (you only need to enter a customer’s name).
How can I achieve this?
My first idea was to replicate the same behavior of another field which is of Select type and shows a list of predefined items. The last item in the list is Other, which offers the possibility of adding a user-defined value.
When that item is selected, the current field of Select type is replaced by a field of Text type where the user can write a new value.