Calc element hidden by javascript showing allways on the top of page

vipzeus

Member
Hello everybody

I have 3 calc elements where are hidden by javascript with some conditions of radiobutton element.
In my form calc elements are hidden and showen as well but on the top of page i have allways showing the calc elements. My template is protostar and i have update yesterday all fabrik folder by github.
Any idea what is the problem?
 
No idea.

You need to provide more detail. A screen shot as it is now, perhaps a screen shot with JS turned off, more detail of the JS you are using.
 
i tried to upload a file but...

copy(/home/fabrikar/public_html/forums/data/attachments/15/15867-e22fe9690b19cb6d82bf58745dd9e774.jpg): failed to open stream: Permission denied
  1. XenForo_Application::handlePhpError()
  2. copy() in XenForo/Helper/File.php at line 253
  3. XenForo_Helper_File::safeRename() in XenForo/DataWriter/AttachmentData.php at line 264
  4. XenForo_DataWriter_AttachmentData->_moveFile() in XenForo/DataWriter/AttachmentData.php at line 223
  5. XenForo_DataWriter_AttachmentData->_writeAttachmentFile() in XenForo/DataWriter/AttachmentData.php at line 159
  6. XenForo_DataWriter_AttachmentData->_postSave() in XenForo/DataWriter.php at line 1409
  7. XenForo_DataWriter->save() in XenForo/Model/Attachment.php at line 524
  8. XenForo_Model_Attachment->insertUploadedAttachmentData() in XenForo/ControllerPublic/Attachment.php at line 204
  9. XenForo_ControllerPublic_Attachment->actionDoUpload() in XenForo/FrontController.php at line 347
  10. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  11. XenForo_FrontController->run() in /home/fabrikar/public_html/forums/index.php at line 13
 
Please post the calc element php code. That is probably what is triggering the error.

And my guess is that the the stuff you have "on the top of the page" is because you have included an "echo..." somewhere in the PHP code of the calc element - so that is being echoed at the top of the page.
 
yes im confirm that. i have echo. what other can i use at echo place?
To return a value for a calc element use 'return' (in the last line) of the code, not echo.
e.g.
PHP:
$value = 'test';
return $value;
would show 'test' as the calc element value.

Use echo only for debugging purposes. But be sure to remove any echo lines in your calc code once you have finished debugging - else the calc may not work.

I would recommend referencing the Wiki before posting questions in the forum.;)
http://fabrikar.com/forums/index.php?wiki/calculation-element/
 
Last edited:
Great guess Bauer.

It it helps for the future, three other ways of showing debugging info:

1. Send it to the Joomla message area: JFactory::getApplication()->enqueueMessage('debug message', 'message');

2. Put it into the Fabrik debug log shown when you have it enabled and add &fabrikdebug=1 to the end of your URL: FabrikHelperHTML::debug('debug message', 'debug:heading');

3. Use the JDump extension: dump('debug message','debug heading');
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top