Register

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
    Posts
    2
    Member #
    3888
    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.

    Code:
    <?php
    
    
    defined( 'MVC_FRAMEWORK') or die( 'Direct Access to this location is not allowed.' );
    
    
    ?>
    
    <?php 
    /**********************************************************************************
     * 								JAVASCRIPT & CSS
     **********************************************************************************/	
    $headScripts = array(
     	'js'=>array(
    		'jreviews','jquery','jq.dimensions','jq.bigframe','jq.tooltip','jq.datepicker','jq.selectboxes',
    		'jq.jreviews.plugins','jq.onload'
    	),
    	'css'=>array(
    		'theme','theme.form','jq.tooltip','jq.thickbox','jq.datepicker'
    	)
    );
    
    # Load javascript libraries
    $Html->js(arrayFilter($headScripts['js'], $Libraries->js()));
    
    # Set noConflict mode for jQuery
    if(in_array('jquery',$headScripts['js'])) {
    	cmsFramework::addScript(sprintf($Html->tags['javascriptcode'],'jQuery.noConflict();'));
    }
    
    # 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;?>
    
    
    <?php 
    # Transforms class="wysiwyg_editor" textareas
    if($this->Access->loadWysiwygEditor()) {
    	$Editor->load(); 
    	$Editor->transform();
    }
    ?>
    
    <?php 
    /**********************************************************************************
     * 								EDIT HTML BELOW THIS LINE
     **********************************************************************************/
    ?>
    
    <?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(
    						'data[Listing][sectionid]',
    						array_merge(array(array('value'=>null,'text'=>__t("Select Section",true))),$sections),
    						$listing['Listing']['section_id'],
    						array('id'=>'sectionid','class'=>'inputbox','size'=>'1','onchange'=>'submitSection();')
    					);
    			?>
    			</span>
    			&nbsp;&nbsp;
    			<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" />
    			</span>
    											
    			<br />
    		</div>
    		<?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;?>
    			</div>
    			
    			<?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');?>" />
    		</div>			
    	</form>	
    </div>
    <?php endif;?>

  2.  


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 01:18 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com