Parse a string field to dict with options

        String value is used as field name. Options can be given after = symbol.
        Where key value is separated by : and different options by ;, when no : is used then the value becomes True.

        **Example 1:** `field_name`

        .. code-block:: python

            # Output
            {
                'field': 'field_name'
            }

        **Example 3** `field_name=option1:some value;option2: other value`

        .. code-block:: python

            # Output
            {
                'field': 'field_name',
                'option1': 'some value',
                'option2': 'other value',
            }

        **Example 3** `field_name=option1;option2: other value`

        .. code-block:: python

            # Output
            {
                'field': 'field_name',
                'option1': True,
                'option2': 'other value',
            }

        :param str field_data:
        :return dict:

def parse_string_field(self, field_data):
        """
        Parse a string field to dict with options

        String value is used as field name. Options can be given after = symbol.
        Where key value is separated by : and different options by ;, when no : is used then the value becomes True.

        **Example 1:** `field_name`

        .. code-block:: python

            # Output
            {
                'field': 'field_name'
            }

        **Example 3** `field_name=option1:some value;option2: other value`

        .. code-block:: python

            # Output
            {
                'field': 'field_name',
                'option1': 'some value',
                'option2': 'other value',
            }

        **Example 3** `field_name=option1;option2: other value`

        .. code-block:: python

            # Output
            {
                'field': 'field_name',
                'option1': True,
                'option2': 'other value',
            }

        :param str field_data:
        :return dict:
        """
        field_name, *data = field_data.split('=', 1)
        field = {
            'field': field_name,
        }

        for option_string in ''.join(data).split(';'):
            option, *value = option_string.split(':')
            if option.strip():
                field[option.strip()] = value[0].strip() if value else True

        return field