I don't have the answer, but he asked for ad_form not the deprecated use of templating directly. We really should use ad_form and forget about examples using the templating system directly (I realize there are a few case where this is necessary, but not very often.)