Input groups in columns

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10039137
    manugi
    Participant

    Hello,
    I have the following code:

    
    <div class="form-group row pb-3">
    <label class="col-sm-3 control-label" for="dominio_cp_username">CP username <span class="required">*</span></label>
    <div class="input-group col-sm-3">
    <input class="form-control" id="dominio_cp_username" maxlength="32" name="dominio_cp_username" required type="text" <?php if ($_COOKIE["sslkey"]) { ?>value="<?php echo $dominio_cp_username; ?>"<?php } else { ?>placeholder="Sblocca il campo"<?php } ?> />
    <div class="input-group-text">
    <a class="modal-with-form btn btn-default" href="#modalSSLKey" tabindex="-1"><i class="fas fa-eye"></i></a>
    </div>
    </div>
    <label class="col-sm-3 control-label" for="dominio_cp_password">CP password <span class="required">*</span></label>
    <div class="input-group col-sm-3">
    <input class="form-control" id="dominio_cp_password" maxlength="32" name="dominio_cp_password" required type="text" <?php if ($_COOKIE["sslkey"]) { ?>value="<?php echo $dominio_cp_password; ?>"<?php } else { ?>placeholder="Sblocca il campo"<?php } ?> />
    <div class="input-group-text">
    <a class="modal-with-form btn btn-default" href="#modalSSLKey" tabindex="-1"><i class="fas fa-eye"></i></a>
    </div>
    </div>
    </div>
    

    and the the fields CP Username and CP Password sholud be on the same row but the .input-group CSS class is set to 100% and you can see the result here:
    https://www.smartware.biz/img/temp/input-group.png

    Can you help me to solve?

    Thank you again
    Emanuele



    Template Version: 4.0.0
    #10039142
    Support
    Keymaster

    Hello, you can create a row with 2 columns, like this:

    <div class="row pb-3">
    	<div class="col-sm-6">
    		<div class="row">
    			<label class="col-sm-6 control-label" for="dominio_cp_username">CP username <span class="required">*</span></label>
    			<div class="input-group col-sm-6">
    				<input class="form-control" id="dominio_cp_username" maxlength="32" name="dominio_cp_username" required type="text" <?php if ($_cookie["sslkey"]) { ?>value="<?php echo $dominio_cp_username; ?>
    				"<?php } else { ?>
    				placeholder="Sblocca il campo"<?php } ?>
    				 />
    				<div class="input-group-text">
    					<i class="fas fa-eye"></i>
    				</div>
    			</div>
    		</div>
    	</div>
    	<div class="col-sm-6">
    		<div class="row">
    			<label class="col-sm-6 control-label" for="dominio_cp_password">CP password <span class="required">*</span></label>
    			<div class="input-group col-sm-6">
    				<input class="form-control" id="dominio_cp_password" maxlength="32" name="dominio_cp_password" required type="text" <?php if ($_cookie["sslkey"]) { ?>value="<?php echo $dominio_cp_password; ?>
    				"<?php } else { ?>
    				placeholder="Sblocca il campo"<?php } ?>
    				 />
    				<div class="input-group-text">
    					<i class="fas fa-eye"></i>
    				</div>
    			</div>
    		</div>
    	</div>
    </div>

    Regards.


    #10039144
    manugi
    Participant

    Hello,
    this solution is ok but I prefer not to use it because the labels appear above the input, not at the left as any other input.

    Anyway thank you so much for your help,
    Emanuele


Viewing 3 posts - 1 through 3 (of 3 total)

This topic is marked as "RESOLVED" and can not rceive new replies.