The 'valuehtmlcallback' function is needed when an AJAX-supporting form field has an initial value that needs special rendering, similar to how the AJAX code would render it when the user changes it dynamically. */ processResults : function ( selector, results ).Ī good example is here: admin/tool/lp/amd/src/frameworks_datasource.js $searchareas = \core_search\manager :: get_search_areas_list ( true ) $areanames = array () foreach ( $searchareas as $areaid => $searcharea ) New array of results. ![]() ![]() There is no option to (say) manipulate data in the class (that may affect the rendering of the form) between instantiating the form and calling any other methods. Note that the definition function is called when the form class is instantiated. Please do not create conditional elements in definition(), the definition() should not directly depend on the submitted data. The definition() should include all elements that are going to be used on form, some elements may be removed or tweaked later in definition_after_data(). And only data that corresponds to a form element in the definition will be accepted as submitted data. For select and checkbox type elements only data that could have been selected will be allowed. is all included in a function you must define in your class.ĭefinition() is used to define the elements in the form and this definition will be used for validating data submitted as well as for printing the form. The definition of the elements to be included in the form, their 'types' (PARAM_*), helpbuttons included, etc. 3.23.1 add_action_buttons($cancel = true, $submitlabel=null).
0 Comments
Leave a Reply. |