If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Junior Member
    Join Date
    Nov 2003
    Member #
    Im using a component that has a drop down select list that populates the correct category in the button settings. However, the user can still select the drop down and choose another category. Im trying to rpevent this, so I figured I would attempt to disable the drop down as inactive, but still populate when the button is pressed.

    The drop down is being called by a php echo tag i think, so i tried the disable tag, but no luck. Ill post the code here.

    The drop down im trying to disable is the "Section" input.

    defined( 'MVC_FRAMEWORK') or die( 'Direct Access to this location is not allowed.' );
     * 								JAVASCRIPT & CSS
    $headScripts = array(
    # Load javascript libraries
    $Html->js(arrayFilter($headScripts['js'], $Libraries->js()));
    # Set noConflict mode for jQuery
    if(in_array('jquery',$headScripts['js'])) {
    # Load CSS stylesheets
    $Html->css(arrayFilter($headScripts['css'], $Libraries->css()));	
    # Trigger new form if both section and category are selected
    if($listing['Listing']['section_id'] && $listing['Listing']['cat_id']):?>
    <script type="text/javascript">jQuery(document).ready(function() {submitCategory();});</script>
    <?php elseif($listing['Listing']['section_id']):?>
    <script type="text/javascript">jQuery(document).ready(function() {submitSection();});</script>
    <?php endif;?>
    # Transforms class="wysiwyg_editor" textareas
    if($this->Access->loadWysiwygEditor()) {
    <?php if(in_array(1,$submit_step)):?>
    <div id="form_container" class="jr_pgContainer">
    	<form target="listing_submit" id="newItemForm" name="newItemForm" action="<?php echo WWW_ROOT;?>index2.php?no_html=1&amp;option=com_jreviews&amp;url=listings/_save" enctype="multipart/form-data" method="post">
    		<?php if(!(int)$listing['Listing']['listing_id']):?>			
    			<?php __t("<h1 class=\"contentheading\">Submission instructions</h1><ul><li>Select the section and category where you want to submit the new item.</li><li>All fields marked with asterisks are required.</li><li>Make sure any image files conform to the required specifications (.jpg,.gif,.png)</li></ul>");?><br />
    		<?php endif;?>
    		<?php if(!(int)$listing['Listing']['listing_id'] || (in_array($Access->gid,array(20,21,23,24,25)))):?>
    		<div class="jr_formChooser">
    			<span id="section">
    			<?php echo $Form->select(
    						array_merge(array(array('value'=>null,'text'=>__t("Select Section",true))),$sections),
    			<span id="category"><?php echo $this->element('category_list');?></span>
    			<span id="spinner" style="display: none;">
    				<img alt="loading" src="<?php echo $this->viewImages;?>loading.gif" />
    			<br />
    		<?php else:?>
    		<input id="sectionid" name="data[Listing][sectionid]" type="hidden" value="<?php echo $listing['Listing']['section_id'];?>" />
    		<input id="catid" name="data[Listing][catid]" type="hidden" value="<?php echo $listing['Listing']['cat_id'];?>" />
    		<?php endif;?>
    		<div class="jr_form">
    			<div id="new_fields"><!-- div required to show/hide form on section/category selection -->
    			<?php if(in_array(2,$submit_step)):?><?php echo $this->renderControllerView('listings','create_form');?><?php endif;?>
    			<?php echo $Form->token('jr_ListingToken');?>
    			<input type="hidden" id="id" name="data[Listing][id]" value="<?php echo $listing['Listing']['listing_id'];?>" />
    			<input type="hidden" id="return_url" name="data[return_url]" value="<?php echo isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : cmsFramework::route('index.php');?>" />
    <?php endif;?>


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 12:22 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: