Forum OpenACS Development: ad_form. Change format before sending

Hi!

I'm using a date field in an
(...
{deadline:date(text)
        {label "Plazo"}
        {html {id sel1}     }
        {help_text "Format MM/DD/YYYY"}
        {after_html { <input type='reset' value=' ... ' onclick=\"return showCalendar('sel1', 'm/d/y');\"> \[m-d-y\] }}
    }

(...)

showCalendar use m-d-y format but I need MM/DD/YYYY . I know (https://openacs.org/forums/message-view?message_id=330424) that showCalendar has been updated to support format but I use OACS 5.1. So,

How can I change format before sending the form? I had TCL code (with deadline with format value m-d-y):

    regexp {([0-9]+)-([0-9][0-9])-([0-9][0-9])} $deadline match year month day
    set deadline ""
    append deadline $month "/" $day "/" $year

but I don't know where do I have to put it? I try with on_submit but didn't work

Any Idea