Create a question with the code name 'informedconsent'. You can choose many types of questions types. The answers to the questions are translated to a consent using this algorithm that checks the answer against the consents stored in Setup ⇒ Codes ⇒ Consents.
If you then use and answer the survey the informed consent will be set tot the 'informedconsent' field as long as it is not empty.