Jump to content

Recommended Posts

Hi, I need to change the condition of presenting a drop down list instead of checkbox to be related to order amount in the cart, what do I change in the below condition? 

 

          <?php  if ( $this->Installments_field ) : ?>
            </p>
                <p class="form-row form-row-last">
                  <label for="offline_cc_Installments"><?php _e("Installments", 'wc_offline_cc') ?> <span class="required">*</span></label>
                  <select name="offline_cc_Installments" id="offline_cc_Installments">
                           
                            <option value="1"><?php _e('תשלום אחד', 'wc_offline_cc') ?></option>
                            <option value="2"><?php _e('שני תשלומים', 'wc_offline_cc') ?></option>
                            <option value="3"><?php _e('שלושה  תשלומים', 'wc_offline_cc') ?></option>
 

Link to comment
https://forums.phpfreaks.com/topic/311266-php-programing/
Share on other sites

Do you know what the HTML markup is for checkboxes?

Your drop down does not support multiple selections right now. Checkboxes do support multiple selections. Do you want that, and if so are you working on changing your PHP code to support that?

Link to comment
https://forums.phpfreaks.com/topic/311266-php-programing/#findComment-1580276
Share on other sites

Hi Thank you for your reply, I don't need multiple selection the client allows to select only one option for how many installments he needs.

I just want the list to be presented only at certain order mount, now if I want him to see the list I select the checkbox in my admin interface which in  the "IF" condition in the above code.

Yaron

Link to comment
https://forums.phpfreaks.com/topic/311266-php-programing/#findComment-1580299
Share on other sites

Checkboxes are for multiple selections. If you do not want multiple selections then do not use checkboxes. Use radio buttons instead.

So I'll make a minor change to my first question and repeat it here: do you know what the HTML markup is for radio buttons? When you have that, all you have to do is drop the <select> tags and replace each <option> with a radio button. (And then probably a little more markup or styling to make the radio buttons appear the way you want.)

Link to comment
https://forums.phpfreaks.com/topic/311266-php-programing/#findComment-1580301
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.