Forum


Calc Builder Support

Calc Builder support
Forums
No se permite escribir sin estar logado. Por favor, login

Hide fields on Calculate 01.08.2012 18:55

Hello,

I have one question, hopefully you have faced this before. Is it at all possible, for when the user clicks the calculate button, the form layout hides as the exit layout shows, and when the reset button is clicked, the form layout is displayed again?

kind Regards,
Moonsoft Team
www.moonsoft.es

Re: Hide fields on Calculate 01.08.2012 18:59

Hello,

You can doit adding this code to 'Javascript events' in your Calcbuilder admin:

//DO NOT MODIFY THIS LINE, IS NEEDED TO HANDLE PROPER CALCULATOR INSTANCE
seed=$('cb_layout_wrapper').getParent().getProperty('id').substr(0,$('cb_layout_wrapper').getParent().getProperty('id').indexOf("_"));

// Event on Calculate Button
$(seed+'_calculate').addEvent('click',function(){
// Hide fields
$(seed+'_cb_form').getElement('.cb_layout_wrapper').hide();
// Hide calculate button
$(seed+'_calculate').hide();
});

// Event on Reset Button
$(seed+'_calc_adminForm').getElement('input[type=reset]').addEvent('click',function(){
// Show fields
$(seed+'_cb_form').getElement('.cb_layout_wrapper').show();
// Show Calculate button
$(seed+'_calculate').show();
// Hide results
$(seed+'_cb_result').hide();
});



This code is made with Calcbuilder 2.0.2 and Joomla 2.5.6. This code is commented to help you to get only features you needed.

Hope this helps. Regards,

Moonsoft Team
Moonsoft Team
www.moonsoft.es

Re: Hide fields on Calculate 02.08.2012 02:14

Thanks, that works perfectly.
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect
FaLang translation system by Faboba

Lo que nuestros clientes opinan de nosotros