Posted on: 2013/4/7 13:08
Re: How to add a customValidationCode to xoopsFormValidate_blockform
I don't think it is the final solution, but at the moment, in 2.6.0 alpha2 there is a file named modules/system/blocks/system_blocks.php
Inside there are 2 kind of specific functions b_xxx_show and b_xxx_edit. The former is for display specific content of a block and the later is for editing.
I have modified the b_system_info_edit
$block_form = new XoopsBlockForm();
$block_form->addElement( new XoopsFormText(_MB_SYSTEM_PWWIDTH, 'options', 1, 3, $options), true);
$block_form->addElement( new XoopsFormText(_MB_SYSTEM_PWHEIGHT, 'options', 1, 3, $options), true);
$block_form->addElement( new XoopsFormText(sprintf(_MB_SYSTEM_LOGO, XOOPS_URL . "/images/"), 'options', 5, 100, $options), true);
$block_form->addElement(new XoopsFormRadioYN(_MB_SYSTEM_SADMIN, 'options', $options));
which is the code found in main.php block
As You see we can add specific elements and with the parameter 'true' in addElement we can set Rquired to true.
I hope this could help.