Jump to content

I want to disable it as soon as a value from dropdown has been selected


mubeensamoon

Recommended Posts

Moved.

 

Are you sure you want to use a dropdown for after they've made their selection? It's not like they can change it anymore.

I suggest you reconsider whether you want to prevent the user from changing their mind, or else use Javascript to change the input entirely - like from a dropdown to a hidden input and plain text.

<select name="foo">
<option value="value1">Option 1</option>
<option value="value2">Option 2</option>
</select>
<input type="hidden" name="foo" value="value1">
Option 1
Link to comment
Share on other sites

Use two forms. Besides the fact that having those two buttons on the same form would be confusing, if someone chooses a file to upload and then hits Submit, the file still gets uploaded. If you use two separate forms then you avoid that.

Link to comment
Share on other sites

Hi

 

Form 1

<?php 
 
$this->renderPartial('_form', array('modelRebate'=>$modelRebate,'modelUploadAnn'=>$modelUploadAnn)); ?>
 
 
<h3>File Uploader</h3>
 
Form 2
 
<?php 
//Defining the modelUploadedImage
$modelUploadAnn->file_prf = $modelRebate->rebate_prf;
$this->renderPartial('/files/uploadAnn',array('modelUploadAnn'=> $modelUploadAnn));  ?>
 
 
 
I am using the above two forms for the buttons but I am not able to arrive at the answer.
 
 
 
How to disable the one when the other one is selected.???
Edited by mubeensamoon
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.