I'm having difficulty in prefixing the form using labels in front of form fields.
ID is generated randomly of my form files, so also for label = "fieldID"
An example:
& lt; Td> & Lt; Label class = "required" = "ebc2566ad1c3793b" & gt; Name: & lt; Font class = "error" & gt; * & Lt; / Font & gt; & Lt; / Labels & gt; & Lt; Period & gt; & Lt; Input id = "_ ebc2566ad1c3793b" class = "form-control" type = "text" value = "" name = "ebc2566ad1c3793b" placeholder = "max length =" 30 "size =" 16 "& gt; & Lt; / Span & gt; & Lt; / TD & gt;
I am able to use javascript to fill the fields using the ID from the URL, but the identifier is not using "name:" that is between labels.
As I am also using jQuery in the Soem script, I am also not sure which DOM to use.
The example is very welcome.
I'm not sure that I understand 100% of the problem, depending on your content, form labels Want to use? If so:
You can get form labels in this way by using the selector ()
selector in:
var NameLabel = $ ("label: ('name:')");
From there you can use the .next ()
method to capture the brotherhood element which is span
in this case Input field to use input, you will do something like this:
var nameInput = nameLabel.next (). (Find 'Input');
Use .value ()
to set your content this way:
nameInput.val ( 'John doe')
No comments:
Post a Comment