How would I go about using a button to enter default values into a form?

How would I go about using a button to enter default values into a form? I’d like to click a button and be able to enter the usr_login, today’s date, and pass into certain fields on the form.

For instance I’d like to do something like this -->


on sc_button_click
[usr_login] = {field_name}
todays date = {date}
pass = {passOrFail}

This should be something in the php of the button

{field_name} = [usr_login] ;
{date} = date(“Y-m-d”); //i advise not to use the name date as a fieldname.

etc…

a macro "on sc_button_click is new for me?!

Regards, Bert