# WFC **WFC (WebForms Core)** is a web development technology owned and developed by [Elanat](https://elanat.net). It provides a server-orchestrated approach for building interactive web interfaces, consisting of a server-side **WebForms** class and the client-side **WebFormsJS** browser runtime. This Perl implementation package provides the **WebForms** class for the server side of WebForms Core. It generates WebForms Core commands that are returned to the browser and executed by WebFormsJS. ## Installation Install WFC from CPAN using `cpanm`: ```bash cpanm WFC ``` After installation, import the `WebForms` class: ```perl use WebForms; ``` ## Requirements * Perl 5.36.0 or later * WebFormsJS 2.1 or later WFC consists of two cooperating parts: ```text Server → WebForms → Commands → WebFormsJS → HTML DOM ``` The Perl package provides the server-side `WebForms` class. **WebFormsJS** is the client-side runtime that receives and executes the generated commands in the browser. ## Usage with Mojolicious The following example demonstrates using the WebForms Core Perl implementation with the Mojolicious framework: ```perl use Mojolicious::Lite; use WebForms; post '/' => sub { my $c = shift; my $name = $c->param('txt_Name'); my $backgroundColor = $c->param('txt_BackgroundColor'); my $fontSize = $c->param('txt_FontSize'); my $form = WebForms->new; $form->set_font_size(InputPlace::tag('form'), "${fontSize}px"); $form->set_background_color(InputPlace::tag('form'), $backgroundColor); $form->set_disabled(InputPlace::name('btn_SetBodyValue'), 1); $form->add_tag(InputPlace::tag('form'), 'h3'); $form->set_text(InputPlace::tag('h3'), "Welcome $name!"); $c->render(text => $form->response()); }; get '/' => sub { my $c = shift; $c->render(text => <<'HTML');