<%doc>
Mason component assumed as it's the only component out there right now.
</%doc>

<%args>
$form_id
$name
</%args>

<%perl>
use Contentment::Component::Mason;
my $component = Contentment::Component->new;
$component->{path} = $m->request_args->{"$form_id.$name.path"};
$component->{isa}  = 'Contentment::Component::Mason';
$component->{component_text} = $m->request_args->{"$form_id.$name.text"};
$component->save;

my $mason = Contentment::Component::Mason->new;
$mason->{component_id} = $component->id;
$mason->{output_kind}  = 'text/html';
$mason->save;

$context->add_form_value($form_id, $name, $mason);
</%perl>
