IFieldUserPromptRespondent class

IFieldUserPromptRespondent class

Represents the respondent to user prompts during field update.

Remarks

The ASK and FILLIN fields are the examples of fields that prompt the user for some response. Implement this interface and assign it to the FieldOptions.user_prompt_respondent property to establish interaction between field update and the user.

Methods

NameDescription
respond(prompt_text, default_response)When implemented, returns a response from the user on prompting. Your implementation should return None to indicate that the user has not responded to the prompt (i.e. the user has pressed the Cancel button in the prompt window).

Examples

Shows how to create an ASK field, and set its properties (MyPromptRespondent).

class MyPromptRespondent(aw.fields.IFieldUserPromptRespondent):

    def respond(self, prompt_text, default_response):
        return 'Response from MyPromptRespondent. ' + default_response

See Also