sir, Please I have

Hi sir,
Please I have a question about the Appointments+ form .

is there the ability to change the order of the fields? I mean example field Name, will in plats number three and field Email will be in plates number one. is that possible? and how?

Regards
A.J.

  • Adam Czajczyk

    Hello A.J.,

    I hope you're having a nice day today and thank you for your question!

    Are you referring to the booking confirmation form or to some other part of the plugin (e.g. appointments list in admin area)? I'm asking because the booking form doesn't by default include the "Name" field so I'm not sure if this is the place :slight_smile:

    Let me know please and it would be great if you could also share a link to that page on your site with me. If it's a page in admin back-end, please grant me a support access as described in this article:

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Best regards,
    Adam

  • Ashraf

    Hi sir
    I mean the order of the fields on the front page :
    Name, email, address,phone, city, ....

    How can i change the order of fields? please

    I have the following shortcode:

    [app_confirmation title="title here" button_text="click" warning_text="check text me" name="Name:" email="Mail:" phone="Mobile:" address="Address:" city="city:" note="Postnummer:" gcal="google text"]

    I need to be : Name, address, city, note, mail, phone. How can i do that? please

    Regards
    A.J.

  • Adam Czajczyk

    Hello A.J!

    Thank you for your replay!

    I have checked Appointments+ for that and it seems that this wouldn't be possible without editing source code of the plugin and that would mean changing the core files. That's never recommended as it may result in some unexpected additional issues and also changes would be lost upon first update of the plugin.

    I agree that it would make a great feature so I moved that thread to our "Features and Feedback" forum so other members of our community could vote for it. If that idea of "sorting/re-ordering" these fields get more attention from our members, our developers will add it to the plugin in future.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello A.J.!

    You can make such change but please be advised that it's at your own risk as I'm not able to give you an ETA on the next and future updates and tell you what will change. It's possible that if you make the change now then you'll be able to re-apply it after the updated but I can't guarantee this.

    If that's fine for you, then here's what you'd want to do:

    1. in the "wp-content/plugins/appointments" folder locate the "/includes/shortcodes/class-app-shortcode-confirmation.php" file.

    2. edit that file using a clean text editor (such as Notepadd++, Sublime or similar) and...

    3. around line number 154 you'll find this code:

    <div class="appointments-name-field" style="display:none">
    					<label>
    						<span><?php echo $args['name']; ?></span>
    						<input type="text" class="appointments-name-field-entry" id="<?php echo esc_attr(apply_filters('app-shortcode-confirmation-name_field_id', 'appointments-field-customer_name')); ?>" value="<?php echo esc_attr( $n ); ?>" />
    					</label>
    				</div>
    				<div class="appointments-email-field" style="display:none">
    					<label>
    						<span><?php echo $args['email']; ?></span>
    						<input type="text" class="appointments-email-field-entry" id="<?php echo esc_attr(apply_filters('app-shortcode-confirmation-email_field_id', 'appointments-field-customer_email')); ?>" value="<?php echo esc_attr( $e ); ?>" />
    					</label>
    				</div>
    				<div class="appointments-phone-field" style="display:none">
    					<label>
    						<span><?php echo $args['phone']; ?></span>
    						<input type="text" class="appointments-phone-field-entry" id="<?php echo esc_attr(apply_filters('app-shortcode-confirmation-phone_field_id', 'appointments-field-customer_phone')); ?>" value="<?php echo esc_attr( $p ); ?>" />
    					</label>
    				</div>
    				<div class="appointments-address-field" style="display:none">
    					<label>
    						<span><?php echo $args['address']; ?></span>
    						<input type="text" class="appointments-address-field-entry" id="<?php echo esc_attr(apply_filters('app-shortcode-confirmation-address_field_id', 'appointments-field-customer_address')); ?>" value="<?php echo esc_attr( $a ); ?>" />
    					</label>
    				</div>
    				<div class="appointments-city-field" style="display:none">
    					<label>
    						<span><?php echo $args['city']; ?></span>
    						<input type="text" class="appointments-city-field-entry" id="<?php echo esc_attr(apply_filters('app-shortcode-confirmation-city_field_id', 'appointments-field-customer_city')); ?>" value="<?php echo esc_attr( $c ); ?>" />
    					</label>
    				</div>
    				<div class="appointments-note-field" style="display:none">
    					<label>
    						<span><?php echo $args['note']; ?></span>
    						<input type="text" class="appointments-note-field-entry" id="<?php echo esc_attr(apply_filters('app-shortcode-confirmation-note_field_id', 'appointments-field-customer_note')); ?>" />
    					</label>
    				</div>

    4. As you can see, each "<div> ... </div>" block holds a field so just move entire block in place where you wish to display it on site (so above other block or below it) and save the file.

    That will change an order of these files. Please note: before making any change to the core file of the plugin make a copy of that file for backup purpose, just in case something went wrong - so you could restore it to original state. Note down the changes too in order to be able to re-apply them after an update comes out.

    I hope that helps :slight_smile:

    Best regards,
    Adam

  • Predrag Dubajic

    Hi Ashraf,

    These specific changes need to be made in plugin files itself and since there's no way of creating child plugin that would allow modifying the file that way.

    Unfortunately this will need to be applied after each update until the developers add it to the plugin.
    I would suggest bookmarking this thread so you can access it quickly and apply the fix after each update.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.