Audio Download on or off
Installation and Configuration
Adding a checkbox will make nothing different on your site. Its just a checkbox. What it will do is when you look at the details for that audio item, you will have a new variable and it will either be 'on' or 'off'.
You can use {debug} in the template you're interested in to see if that checkbox is there or not.
Docs: "{debug}"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1477/debug
In the template where the download button is shown it will be shown because of this line:
{jrCore_item_detail_buttons module="jrAudio" field="audio_file" item=$item}
You want to check the state of your checkbox, then hide/show the button from there.
Example, if you wanted to turn off the audio download button you could use this code
{jrCore_item_detail_buttons module="jrAudio" field="audio_file" item=$item exclude="jrAudio_item_download_button"}
and the button wont show, so to check the state of your checkbox first, then
{$ex_dl = ''}
{if isset($item.audio_download_checkbox) && $item.audio_download_checkbox == "off"}
{$ex_dl = 'jrAudio_item_download_button'}
{/if}
{jrCore_item_detail_buttons module="jrAudio" field="audio_file" item=$item exclude=$ex_dl}
^^ in that code above im guessing at what you called your checkbox. I dont know if you called it 'audio_download_checkbox' or not in the Form Designer. Use the name you called it.
updated by @michael: 04/20/17 07:36:23PM