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