# Path: easyforms/basicfields.py
# class TextField(form.Field):
# class PasswordField(TextField):
# class TextAreaField(form.Field):
# class IntegerField(TextField):
# class DecimalField(TextField):
# class SelectField(form.Field):
# class RadiosField(SelectField):
# class BooleanCheckbox(form.Field):
# class SubmitButton(form.Field):
# class HiddenField(form.Field):
#     def __init__(self, name, type='text', placeholder=None, **kwargs):
#     def render(self):
#     def __init__(self, name, **kwargs):
#     def __init__(self, name, rows=5, placeholder=None, maxlength=None, **kwargs):
#     def render(self):
#     def __init__(self, name, type='number', min_value=None, max_value=None, step=None, **kwargs):
#     def convert_value(self):
#     def __init__(self, name, type='number', min_value=None, max_value=None, step=0.01, **kwargs):
#     def convert_value(self):
#     def __init__(self, name, key_pairs, empty_option=False, empty_option_name='', button_link_url=None,
#                  button_link_text=None, **kwargs):
#     def render(self):
#     def convert_value(self):
#     def __init__(self, name, key_pairs, empty_option=False, empty_option_name='(none)', **kwargs):
#     def render(self):
#     def __init__(self, name, default=False, **kwargs):
#     def render(self):
#     def convert_value(self):
#     def __init__(self, name, value=None, css_class='btn-primary', render_after_sections=True, **kwargs):
#     def render(self):
#     def __init__(self, name, value, **kwargs):
#     def render(self):
# 
# Path: testapp/customfields/env.py
# def _suppress_none(val):


import logging
from easyforms import basicfields
from .env import env
        super().__init__(name, value.upper() if value is not None else None)
    
    def convert_value(self):
        # self.value is the raw string
        if self.value is not None:
            # The string is present - convert to upper case
            self.value = self.value.upper()


class BasicCustomTextField(basicfields.TextField):
    def render(self):
        html = '[BASIC FIELD]<br> {label}: <input type="text" name="{name}" value="{value}"><br><br>'.format(
            label=self.label,
            name=self.name,
            value=self.value if self.value else ''
        )

        if self.error:
            html = '<p><strong>ERROR: {}</strong></p>{}'.format(self.error, html)

        return html


class CustomTextField(basicfields.TextField):
    def render(self):
        return env.get_template('text_field.html').render(field=self)


class CommaSeparatedListField(basicfields.TextField):
    def render(self):

# Path: easyforms/basicfields.py
# class TextField(form.Field):
# class PasswordField(TextField):
# class TextAreaField(form.Field):
# class IntegerField(TextField):
# class DecimalField(TextField):
# class SelectField(form.Field):
# class RadiosField(SelectField):
# class BooleanCheckbox(form.Field):
# class SubmitButton(form.Field):
# class HiddenField(form.Field):
#     def __init__(self, name, type='text', placeholder=None, **kwargs):
#     def render(self):
#     def __init__(self, name, **kwargs):
#     def __init__(self, name, rows=5, placeholder=None, maxlength=None, **kwargs):
#     def render(self):
#     def __init__(self, name, type='number', min_value=None, max_value=None, step=None, **kwargs):
#     def convert_value(self):
#     def __init__(self, name, type='number', min_value=None, max_value=None, step=0.01, **kwargs):
#     def convert_value(self):
#     def __init__(self, name, key_pairs, empty_option=False, empty_option_name='', button_link_url=None,
#                  button_link_text=None, **kwargs):
#     def render(self):
#     def convert_value(self):
#     def __init__(self, name, key_pairs, empty_option=False, empty_option_name='(none)', **kwargs):
#     def render(self):
#     def __init__(self, name, default=False, **kwargs):
#     def render(self):
#     def convert_value(self):
#     def __init__(self, name, value=None, css_class='btn-primary', render_after_sections=True, **kwargs):
#     def render(self):
#     def __init__(self, name, value, **kwargs):
#     def render(self):
# 
# Path: testapp/customfields/env.py
# def _suppress_none(val):


# Path: testapp/customfields/customfields.py
import logging
from easyforms import basicfields
from .env import env

        super().__init__(name, value.upper() if value is not None else None)
    
    def convert_value(self):
        # self.value is the raw string
        if self.value is not None:
            # The string is present - convert to upper case
            self.value = self.value.upper()


class BasicCustomTextField(basicfields.TextField):
    def render(self):
        html = '[BASIC FIELD]<br> {label}: <input type="text" name="{name}" value="{value}"><br><br>'.format(
            label=self.label,
            name=self.name,
            value=self.value if self.value else ''
        )

        if self.error:
            html = '<p><strong>ERROR: {}</strong></p>{}'.format(self.error, html)

        return html


class CustomTextField(basicfields.TextField):
    def render(self):
        return env.get_template('text_field.html').render(field=self)


class CommaSeparatedListField(basicfields.TextField):
    def render(self):

        return env.get_template('comma_separated_list.html').render(field=self)