but the data doesn’t show up when I call form.getValues(). I have also tried $$(‘form_5’).item(‘sig’).setValue(), but I get an undefined error. Any suggestions?
However, I would still like to know how to access/use the setValue() and getValue of my custom components. Can someone show me a code snippet that demonstrates the correct usage? The tutorial only shows how to set it up.
$$('form_5').item('sig').value=anesSigBlock.sign();
$$('form_5').refresh('sig'); //repaint with new value
but form.setValue is a better approach, because it just changes the value of the element, without full repainting ( which means - it works faster )
to know how to access/use the setValue() and getValue of my custom components
setValue and getValue methods of form element used by form.getValues|setValues calls
setValue method of form elements requires html node as one of parameters, so it is not very usable for direct scripting. It possible to call it directly but it will not have any advantages against form.setValues , or do you have some specific reasons for direct calls?
Now that I understand how setValues() works (thanks for the explanation) I doubt I will be calling setValue() and getValue() directly. Really I was just curious because I might want to add other functions to custom controls, but I can’t even figure out how to access the standard ones. Can you post a line of code with a html node that shows how to do it?