Home › Forums › Ticket Products › Event Tickets Plus › Error message on quantity input field
- This topic has 4 replies, 3 voices, and was last updated 9 years, 12 months ago by
Support Droid.
-
AuthorPosts
-
April 12, 2016 at 7:48 am #1101298
Vivianne
ParticipantIf a user tries to order more tickets for an event than remaining, they get an error message on the input field (here is a screenshot: http://www.directupload.net/file/d/4322/imvcyj2y_png.htm).
How and where can I change the content (text) of this message element?April 12, 2016 at 1:25 pm #1101564Nico
MemberHi Vivianne,
Thanks for getting in touch! I’ll help you out…
First of all, the tickets form seems to be customized or not part of our plugin. Using default tickets form with the latest version of our plugins, I don’t see that message (basically the input goes back to the max quantity if the user inputs a bigger number). Anyway it seems to be a default browsers message, and not one that can be customized. To prevent this message to pop-up, you would need to remove the max attribute of the input element.
Please let me know about it,
Best,
NicoApril 13, 2016 at 12:39 am #1101814Vivianne
ParticipantI use Events Tickets Plus with Woocommerce and integrated the booking form to the list view with this code:
function tribe_etp_move_tickets_purchase_form ( $ticket_location_action, $ticket_location_priority = 10 ) { $etp_classes = array( 'Tribe__Tickets_Plus__Commerce__EDD__Main', 'Tribe__Tickets_Plus__Commerce__WPEC__Main', 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ); foreach ( $etp_classes as $ticket_class ) { if ( ! class_exists( $ticket_class ) ) break; $form_display_function = array( $ticket_class::get_instance(), 'front_end_tickets_form' ); if ( has_action ( 'tribe_events_single_event_after_the_meta', $form_display_function ) ) { remove_action( 'tribe_events_single_event_after_the_meta', $form_display_function, 5 ); add_action( $ticket_location_action, $form_display_function, $ticket_location_priority ); } } }You are right, this is browser specific. It occurs in Chrome.
But I can´t go further with this message, because it doesn´t appear in the code (so I can´t just put a display:none to it) and it doesn´t let me go the the cart.
I really need the max-quantity attribute because my client actually wants to have a specific message to appear (similar to the one now) if someone puts more tickets in the cart than available. But we need that as a standard in every browser.
Can you help me out here?April 13, 2016 at 2:33 pm #1102159Nico
MemberVivianne,
Thanks for following up, and thanks for including the code you are using, seems to be the right call.
You can take a look at this article explaining HTML5 default validation and how to modify the default behavior: http://www.html5rocks.com/en/tutorials/forms/constraintvalidation/
This JS library seems to address that as well: https://github.com/javanto/civem.js
Please let me know if with these resources you are able to solve the issue,
Best,
NicoApril 28, 2016 at 9:35 am #1108274Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Error message on quantity input field’ is closed to new replies.
