Webmaster Forum

Webmaster Forum (http://www.v7n.com/forums/index.php)
-   Coding Forum (http://www.v7n.com/forums/forumdisplay.php?f=16)
-   -   Hiding a "Channel", but not a "Category" (http://www.v7n.com/forums/showthread.php?t=405166)

chrisjchrisj 07-19-2016 04:59 PM

Hiding a "Channel", but not a "Category"
 
In a php video-web-script that I'm using, I modified the (video)Upload Form by hiding the select-a-channel drop-down choices, in the Form, essentially like this:

Code:

<li><input type="hidden" name="channel" value="1"/></li>
(so, that the Channel is pre-determined for the uploader/user).

But, when the Channel is hidden like that, the next field box(sub-categories) in the Form, shows no choices. Apparently, in this Upload Form a Channel choice is required in order to see the sub-category choices.

So, I'm trying to figure out a way to hide the channel, but somehow let the Form know that Channel has been chosen, so that the sub-category drop-down choices are available for choosing, and proceeding.

Here's the code without the hidden Channel:

Code:

<li style="width:240px; text-align:right;"><strong>[var.lang_select_channel]:</strong></li>
<li style="width:400px; text-align:left;">

<select class="upload-video-form-input" style="width:160px;" size="1" name="channel" onchange="javascript:ahahscript.ahah('[var.base_url]/uploader.php?sub_cat='+ document.form_upload.channel.value, 'sub_change', '', 'GET', '', this);">
&nbsp;[var.fields_all;htmlconv=no]</select>&nbsp;([var.lang_select_one])</li>

<li style="width:240px; text-align:right">&nbsp;</li>
<li style="width:380px" class="font5_14"><strong>[var.lang_sub_categories]</strong></li>

<li style="width:240px; text-align:right"><strong>[var.lang_sub_cat]:&nbsp;</strong></li>
<li style="width:400px; text-align:left;" id="sub_change"><select class="upload-video-form-input" style="width:160px;" size="1" name="sub_cat"></select>&nbsp;([var.lang_optional])</li>

Any ideas regarding "hide the channel, but somehow let the Form know that Channel has been chosen, so that the sub-category drop-down choices are available for choosing" will be greatly appreciated.

ScriptMan 07-20-2016 01:46 AM

Without spending more time than I have right now all I can do is point your in the right direction.


In the PHP portion of the script you will need to assign a value to the variable channel.

If you want it to work both ways you will need to do that with an IF() statement. Psuedo php: If this condition is met channel== else channel == input from the form.


All times are GMT -7. The time now is 02:14 AM.

3.8.7