Menu

#637 (ok 4.3) Custom Field Handlers

Needs_decision
fixed
1
2014-12-05
2004-11-05
No

I would really like to have the ability to create and
specify a HTML WYSIWYG editor, or a calendar widget, or
a file upload box, etc to replace the normal HTML
textarea used to edit fields.

I should be able to look at the table (in relation
view?? or when creating fields??) and choose available
field handler widgets from dropdown boxes for each field.

Also, I should be able to validate/manipulate data on a
field-by-field basis. I could deny the update and send
an error message if a checksum on a credit card field
failed. Or I could execute a PHP strtotime() to make a
timestamp.

I am willing to help with this task. Please contact me
at kyle#efactormedia#com. (Replace the pound signs)

Discussion

  • Garvin Hicking

    Garvin Hicking - 2004-11-17
    • priority: 5 --> 6
    • assigned_to: nobody --> garvinhicking
    • status: open --> open-accepted
     
  • Garvin Hicking

    Garvin Hicking - 2004-11-17

    Logged In: YES
    user_id=473563

    I really like that idea.

    I would imagine it to work similar to what the current
    MIME-Transformations already do.

    To make this work, we need to adjust our PMA_table_info
    table to fit another two rows: "Input Transformation" and
    "Input Modified".

    Currently, when a table is displayed, the output
    transformations are applied to the results. It could be done
    to apply input transformations on existing (or empty) data
    in the Edit/Insert screen.

    A handler plugin could be chosen from the files of the
    transformation directory (different naming scheme, of
    course). Functions defined in those files could apply any
    Widget (like FCKEdit, HTMLArea or any custom-made PHP/HTML
    function) around/instead of the default htmlareas.

    There need to be two functions for each input transformation:
    transformation_name_display() and
    transformation_name_save().

    The latter would be called to transform data before it's
    inserted into the database, so that "last-minute-cleanup"
    can be done, or any PHP functions applied (like credit card
    validation).

    Implementation could be pretty much straightforward. If you
    have time to do it, I would love to see it done. I'll try to
    help, of course. :-)

     
    • Viduranga Wijesooriya

      Hi ,
      I don't seem to understand this particular feature request very well. Idea is to add transformations to insert and edit pages too, isn't it ? Why do we need 2 more columns on PMA_table_info. It would be very helpful if someone can explain it more. Thank you

       
      • Marc Delisle

        Marc Delisle - 2014-03-07

        Currently, our transformation system is output-oriented. I believe that Garvin suggested to add two more columns, so that we can specify a new input-oriented transformation. Of course you are free to suggest something else, when (if) you work on this.

         
  • Marc Delisle

    Marc Delisle - 2004-11-17

    Logged In: YES
    user_id=210714

    I like it too.
    Also we could make effective in Edit mode the current
    transformations we see in Browse mode. So for "image/jpeg:
    inline" we would see the image in Edit mode, plus the size
    of contents and the browse button to re-upload contents.

    This has ramifications also on the templates subject: the
    overall Edit/Insert layout

    I also suspect that sometimes we will prefer to see the
    "pure" data in Edit mode, sometimes the transformed data.
    Before adding too many other config variables, it's probably
    time to work on the db-based config feature ...

     
  • Marc Delisle

    Marc Delisle - 2008-07-12
    • assigned_to: garvinhicking --> nobody
     
  • Marc Delisle

    Marc Delisle - 2008-07-26
    • priority: 6 --> 5
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: open-accepted --> open
     
  • Marc Delisle

    Marc Delisle - 2014-01-17
    • labels: Interface Improvements --> Interface Improvements, GSOC 2014
    • assigned_to: Isaac Bennetch
    • Group: --> Needs_decision
     
  • Viduranga Wijesooriya

    Hi ,
    I'm interested in implementing this as part of "User interface enhancements" among many others tasks in GSOC 2014. But I don't seem to understand this particular feature very well. Idea is to add transformations to insert and edit pages too, isn't it ? It would be very helpful if someone can explain it more. Thank you

     
  • Isaac Bennetch

    Isaac Bennetch - 2014-07-12
    • summary: Custom Field Handlers --> (ok 4.3) Custom Field Handlers
    • status: open --> resolved
    • Priority: 5 --> 1
     
  • Marc Delisle

    Marc Delisle - 2014-12-05
    • Status: resolved --> fixed