Another common field type used in configuration pages is a multi-line text area. Once again, we would need to update the ch3sapi_get_options function to specify a default value for this new option if not found. Once this is done, the add_settings_field function is identical to the text and checkbox examples shown in the recipe, while the field rendering code is as follows:
function ch3sapi_display_text_area( $data = array() ) {
extract ( $data );
$options = ch3sapi_get_options();
?>
<textarea type="text" name="ch3sapi_options[<?php echo $name; ?>]"
rows="5" cols="30">
<?php echo esc_html ( $options[$name] ); ?></textarea>
<?php }