Your Time:
Our Time:
← Back to discussions

Terms and Conditions , Mandating that if a field is checked

Need help with a different issue? Search the forums or open a new ticket.
Open a support ticket

This topic has 13 replies, 3 voices, and was last updated 10 years, 4 months ago by hostingames.

  • 2016-04-19 at 11:01 pm
    Support Expired
    #13885
    hostingames
    Participant
    • Topics: 14
    • Replies: 101
    • Total posts: 115
    • Post count: 130

    Hello,
    Mandating that if a field is checked.
    Possible to add a Terms and Conditions in “addnew.php”
    Before valid check and read the Terms?

     <div class="form-group">
                                        <div class="checkbox">
                                            <label>
                                                <input type="checkbox"> By continuing, you agree to the <a href="#"><span class="skin-color">Terms and Conditions</span></a>.
                                            </label>
                                        </div>
                                    </div>

    Then how to add a color on each
    button “iva form .select wrapper”

    can add color
    upload button

    <div class="item">
    							<div class="info">
    								<span class="label">Photo</span>
    								<p class="description">Téléchargez la photo du client. Assurez-vous que la taille de la photo ne dépasse pas 200KB.</p>
    							</div>
    							<div class="option">
    								<input type="file" name="photo" value="upload">
    							</div>
    						</div>

    Possible to replace this code?

    
    						<div class="option">
    							<div class="select_wrapper select-s">
    									<select name="day" class="select">
    									<option value="" selected="">Jour</option>
    									<?php
    									for ($i=1; $i <= 31; $i++) { 
    										echo '<option value="'.$i.'">'. $i .'</option>';
    
    									}
    									?>
    								</select>
    							</div>
    	
    							<div class="select_wrapper select-m">
    								<select name="month" class="select">
    									<option value="" selected="">Mois</option>
    									<option value="01">Jan</option>
    									<option value="02">Feb</option>
    									<option value="03">Mar</option>
    									<option value="04">Apr</option>
    									<option value="05">May</option>
    									<option value="06">Jun</option>
    									<option value="07">Jul</option>
    									<option value="08">Aug</option>
    									<option value="09">Sep</option>
    									<option value="10">Oct</option>
    									<option value="11">Nov</option>
    									<option value="12">Dec</option>
    								</select>
    							</div>
    							<input type="hidden" class="ratingtype" value="<?php echo $ratingsformat;  ?>" /> 
    							<div class="select_wrapper select-m">
    									<select name="year" class="select">
    										<option value="" selected="">An</option>
    										<?php
    										date_default_timezone_set('UTC');
    										$year = date('Y');
    										for ($i= $year; $i >= 1990; $i--) { 
    											echo '<option value="'.$i.'">'. $i .'</option>';
    
    										}
    										?>
    									</select>
    								</div>
    							</div>

    by

    <div class="datepicker-wrap">
                                                    <input type="text" name="date_from" class="input-text full-width" placeholder="mm/dd/yy" />
                                                </div>

    thank you

    2016-04-20 at 4:51 pm
    #13908
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    Mandating that if a field is checked.

    You can use jquery for mandating and adding a condition in the javascript in addnew.php file.

    2016-04-20 at 4:52 pm
    #13909
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    Sorry I don’t know about the above datepicker stuff, better you hire someone and replace code if needed.

    2016-04-21 at 4:51 am
    Support Expired
    #13924
    hostingames
    Participant
    • Topics: 14
    • Replies: 101
    • Total posts: 115
    • Post count: 130

    Hello,

      you have jQuery?
    thank you

    2016-04-21 at 7:01 am
    Support Expired
    #13926
    hostingames
    Participant
    • Topics: 14
    • Replies: 101
    • Total posts: 115
    • Post count: 130

    hi,
    can we have the name of jQuery?
    to integrate addnew.php file

    Then how to add a color on Each
    button “iva form .select wrapper”

    can we add color
    on the download button

    thank you

    2016-04-21 at 11:41 am
    #13938
    Anonymous
    Inactive
    • Topics: 0
    • Replies: 3227
    • Total posts: 3227
    • Post count: 0

    If you know coding HTML/CSS you can inspect elements and change the colors for buttons or for the whole script or any elements you wish. Regarding the query for the mandating the field here is the query.

    else if (jQuery("#terms_and_con").prop("checked")==false) {
    	alert("Check this if you agree to the terms and conditions.");
    	frm.terms_and_con.focus();
    	return false;			
    }

    add this in the addnew.php after the captcha validation on line no around 131.

    2016-04-22 at 4:56 am
    Support Expired
    #13945
    hostingames
    Participant
    • Topics: 14
    • Replies: 101
    • Total posts: 115
    • Post count: 130
    This reply has been marked as private.
    2016-04-22 at 10:42 am
    #13948
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    You placed the code in a wrong place if you know coding then do it or else hire someone to get it done. Its a custom work.

    You asked about query I gave you a query despite of its a custom work. If you want to customize either pay extra $$$$ or hire someone from studio.envato.com

    2016-04-23 at 12:26 am
    Support Expired
    #13965
    hostingames
    Participant
    • Topics: 14
    • Replies: 101
    • Total posts: 115
    • Post count: 130

    Hello,

    sorry, I have seen the error name.
    add the code above return true;
    needs to change “#terms_and_con”?

    thank you

    2016-04-23 at 2:47 am
    #13966
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    Define your element which you want to mandate with an id and assign it same in the jQuery to validate it.

    • This reply was modified 10 years, 4 months ago by Fem.
    2016-04-23 at 4:52 am
    Support Expired
    #13969
    hostingames
    Participant
    • Topics: 14
    • Replies: 101
    • Total posts: 115
    • Post count: 130

    HI,

    learns sorry, I’m a beginner

    id in jQuery to validate it.
    correct: checkbox

    else if (jQuery("#checkbox").prop("checked")==false) {
    	        alert("Cochez cette case si vous acceptez les termes et conditions.");
    	       frm.checkbox.focus();<code></code>
    

    ID in class:
    correct: checkbox

    <div class="form-group">
                                        <div class="checkbox">
                                            <label>
                                                <input type="checkbox"> By continuing, you agree to the <a href="#"><span class="skin-color">Terms and Conditions</span></a>.
                                            </label>
                                        </div>
                                    </div>

    `

    thank you

    • This reply was modified 10 years, 4 months ago by hostingames.
    2016-04-24 at 7:42 am
    Support Expired
    #13972
    hostingames
    Participant
    • Topics: 14
    • Replies: 101
    • Total posts: 115
    • Post count: 130

    Hello,
    A question
    correct?
    We change element
    terms_and_con by checkbox

    correct?

    <script type="text/javascript">
    	function validatefrm() 
    	{
    else if( frm.captcha.value === "" ) {
    			alert("Enter captcha");
    			frm.captcha.focus();
    			return false;
    		}
    		else if (jQuery("#checkbox").prop("checked")==false) {
    	        alert("Cochez cette case si vous acceptez les termes et conditions.");
    	        frm.checkbox.focus();
    	        return false;			
             }
    			
    		return true;
    	}

    correct?

    						<div class="item">
                                <div class="checkbox">
                                    <label>
                                    <input type="checkbox"> En continuant, vous acceptez les <a href="#"><span class="skin-color">Conditions générales</span></a>.
                                    </label>
                                </div>
                           </div>
    					   <br/>
    
                           	<input type="submit" class="button green-button" name="Add" value="soumettre">	
    						
    					</form>

    Thank you

    • This reply was modified 10 years, 4 months ago by hostingames.
    2016-04-25 at 10:46 am
    #13976
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    I’m so sorry I wish I can help you out but its out of the envato rules to help beyond the described item features. I recommend you to studio.envato.com and hire someone to get custom works done.

    • This reply was modified 10 years, 4 months ago by Fem.
    2016-05-10 at 9:18 pm
    Support Expired
    #14305
    hostingames
    Participant
    • Topics: 14
    • Replies: 101
    • Total posts: 115
    • Post count: 130

    hi,we did a test
    the checkbox,
    works

You must be logged in to reply to this topic.