[html-formfu] Help getting started with a concept. Update.

xaos at darksmile.net xaos at darksmile.net
Fri Jul 1 02:14:42 GMT 2011


After trying a bunch of different things, I
have settled on doing things this way:

Top of page is a (spreadsheet using tables).
The table, "<tr>" element is: "<tr onClick=\"rowClick(event);\">"

In perl I create the table and it contains all the data.

When a user clicks on a (spreadsheet table-row), javascript creates the form
below the (spreadsheet table).

Also, when clicking on the headers (of the spreadsheet table), I use
javascript to sort the table.

In all, the whole page is very dynamic and alive.

I will post the code when I clean things up.

In the end, using javascript was the way to go.

Thank you all for listening.

-George


Quoting Benjamin Martin <benmartin at venda.com>:

> hello,
>
> If you want to produce the same FF form but in readonly mode, you
> could always process the FF form object after you have loaded the YAML
> (if thats how you are are populating the form)
>
> .. something like this:
>
>   my  $form  =  HTML::FormFu->new;
>   $form->load_config_file('form.yml');
>
>   if ( $read_only ) {
>     foreach ( @{$form->get_all_elements  } ){
>       $_->add_attributes(  readonly  =>  'readonly');
>     }
>    }
>
>
> As for the grid, like Peter said, looking into 'Repeatable' element
> type might be the way to go. If you get stuck, post again perhaps
> providing some example HTML you want FF to produce.
>
> good luck,
>
> -B
>
>
> On 30/06/11 08:24, Peter Shangov wrote:
>> Hi Xaos,
>>
>> From what I understand, you want to edit a grid with FF. I have not  
>>  seen examples of this having been done yet, but you may want to   
>> have a look at how Repeatable elements work. As far as the UI is   
>> concerned (toggling between R/O and R/W) FF itself cannot help you   
>> there, you will have to use some javascript solution (e.g. google   
>> for jquery grid plugins and see if anything seems to do what you   
>> need).
>>
>> Hope that helps,
>>
>> Cheers,
>>
>> --
>> Peter
>>
>>    ------------------------------------------------------------------------
>>    *From:* "xaos at darksmile.net" <xaos at darksmile.net>
>>    *To:* html-formfu at lists.scsys.co.uk
>>    *Sent:* Thursday, 30 June 2011, 3:48
>>    *Subject:* [html-formfu] Help getting started with a concept.
>>
>>    Sorry everyone. I initially posted this under a wrong thread as a
>>    new message.
>>    I think I was reading the thread and then just tried to post a new
>>    message.
>>
>>    Apologies :(
>>
>>    Anyway, here I go again:
>>
>>    I need some help getting started with a form.
>>
>>    These are my requirements:
>>
>>    I need a X-Y table of cells (of constant X size but
>>    dynamic Y) which I will populate with data.
>>
>>    On first viewing, the table will be R/O. The user
>>    should not be able to change the content.
>>
>>    On hit of a "R/W" button, the data becomes R/W
>>    and the user goes in and makes changes.
>>
>>    The changed data should show up as a different color.
>>
>>    Can you guys point me in the right direction?
>>
>>    Any examples?
>>
>>    As before, I will publish the resultant code.
>>
>>    Many thanks in advance,
>>
>>    -George
>>
>>
>>    _______________________________________________
>>    HTML-FormFu mailing list
>>    HTML-FormFu at lists.scsys.co.uk <mailto:HTML-FormFu at lists.scsys.co.uk>
>>    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>>
>>
>>
>> _______________________________________________
>> HTML-FormFu mailing list
>> HTML-FormFu at lists.scsys.co.uk
>> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu






More information about the HTML-FormFu mailing list