Eliminate Text Bubble Error On SilverStripe 3 Forms - forms

For some reason I'm getting two different kinds of error messages on the same SS 3 form as shown in the referenced screenshot. How do I get rid of the text bubble style error message on the email field and have them all look like the error box on the name field?
Screenshot: http://d.pr/i/ThmL
Bob

In SilverStripe 3.0/1 it enabled the use of the HTML5 required attributes which web browsers pick up and do their own validation for (which you've seen).
If you want to stop the browser behaviour remove the required attribute from the markup SilverStripe provides
TextField::create('MyTextField')->setAttribute('required', false)
This will still make the form field required in the PHP validation but disable the browser popup.

Related

Bootstrap Vue invalid feedback on input not computed

I am working on a project that previous developer used Bootstrap Vue, the problem I have is with b-form-invalid-feedback.
Invalid feedback works once page is loaded, the reason for that is the docs provides example does the same
, now if you have a page with 10 input for a user to register and directly after he opens the page immediately the invalid feedback starts and shows errors in all fields for the user before he even starts writing his name.
Bootstrap V4.3 CSS uses sibling selectors to show/hide valid/invalid feedback.
Wrap each input+feebdack components inside a div so that the other inputs/feedback are no longer siblings of the previous input(s).

Laravel 5.4 - Display errors to appended inputs in a form

Whatsup guys
I am struggling with an issue which is displaying errors on appended inputs in a form after submit. I guess there is a simple solution on this which i dont know of because i am a newbie in Laravel.
Scenario:
I have a form where a user needs to select a category and depending on the selection, a few inputs should be appended (with ajax) into the same form below the category dropdown. I have set up the validations and the error rendering on the html but it doesnt seem to work yet the request doesnt pass since it detects the validations.
Any clues?
You will not be able to display the errors next to form inputs that have been retrieved with Ajax. However, you may use an error box at the top of the screen describing the problem. Or you may simply post the form using Ajax instead of a page refresh, then using JavaScript, you can display the errors to the appended input.
If this is not an answer to the question you are asking, please provide code and more details.

Needing to have a form in every instance of a content type that can be submitted once per node - Drupal 7

So here's the situation and I cannot figure out how to accomplish it.
I have a content type called "Alert". Each instance of this content type needs to have a webform (really just a submit button with hidden fields), that users click to acknowledge they have read and understand the alert. Ideally once submitted, the form should be replaced with a message along the lines of "You have marked this alert as read."
I do have a webform created (displaying as a block to be able to place within the variant page set up for the Alert type) and can get it to appear on each instance, but users can submit multiple times on each alert (submissions are set to unlimited as if i set it to 1 submission per user, the form does not render after the first submission on any alert). Additionally, once they click on one instance of the form, every additional instance will result in a message stating they have already submitted the form.
So I really have two issues. First, and most importanlty, allow a single submission per node (without the "already submitted" notice). Second, not required but would be nice, once it has been submitted for a specific node, the form no longer renders on that node for that particular user. Anyone have any ideas on the best way to accomplish these two aspects?
I'm running on Drupal 7.56, using the AT_Panels_Everywhere theme, Webform module Version: 7.x-4.15.
In drupal 7, with webform 7.x-4.0, you can enable webforms within a content type. To do so:
Go to Structure > Content Types
[Respective content type] > Edit
In the bottom left section, find the Webforms Tab and choose Enable webforms for this content type.
Based on your use case, I'd recommend enabling that and installing the node clone module. Then you can make one alert node, setup the webform, limited to one submission per user and allow content managers to clone content. That node can serve as a template.

Chrome HTML5 field validation message disappears under the dom?

I am dealing with html5 forms and I have a field with a required attribute set. When the user wants to submit the form, chrome displays the validation message, that the field must not be empty. Strangely, this message seems to slip under the other html markup. I dont think I have any css set that could cause this.
Is this a bug or am I missing something?
http://www.abload.de/img/errorogbcv.png
the html5 validation message was cut off/ under the dom due to overflow:hidden.

Internet Explorer 9 Posts Forms Differently?

I've been using buttons for quite some time that are structured as follows:
<button type='submit'><em class='ui-icon ui-icon-disk'/><span>Save</span></button>
The tag then uses the jquery-ui icons to show a disk image for the button. PROBLEM: As soon as users started using IE9, they were getting the server error:
A potentially dangerous Request.QueryString value was detected from the client (<em class=ui-icon)
I can only assume that IE9 is posting the form values differently - does anyone know how to stop the browser submitting certain form elements or how to resolve this issue?
PROBLEM SOLVED
If you remove the name attribute from the button element then the form will not submit its value or the value of any element within it.
Use <input type="image"> instead.