How to load a custom function on dialog box

hello ,

I want to load my custom function on onload on dialog box how to acheiev this

I think you do it like this:

frappe.prompt([
{ā€˜fieldnameā€™: ā€˜birthā€™, ā€˜fieldtypeā€™: ā€˜Dateā€™, ā€˜labelā€™: ā€˜Birth Dateā€™, ā€˜reqdā€™: 1} ],
function(values){
alert(ā€œhiā€);}
,ā€˜Age verificationā€™,ā€˜Subscribe meā€™)

1 Like