FAQ » History » Version 2
Version 1 (Luke Murphey, 08/10/2014 05:55 AM) → Version 2/5 (Luke Murphey, 11/01/2014 07:30 AM)
h1. FAQ
h2. Can I specify more than one selector (to match different things on a single page)
Yes, enter multiple selectors separated by commas. To match both span and div tags, you would enter a selector of "span,div".
h2. Can I use attributes to set the field names?
You can use the "Name Attributes" option on the Output section to tell the app to use attribute values as the field name.
For example, consider the following HTML:
<pre>
<div id="model">Focus</div>
<div name="submodel">ST</div>
<div name="make" id="car">Ford</div>
</pre>
Assuming you have the CSS selector set such that it matches all "div" tags, you would get the following output:
match=Focus match=ST match=Ford
The matches do not distinguish which div tag was set (cannot tell which field is the model, submodel or make). If the setting of the name attributes is "name", "name,id", then the app would look for the "name" attribute or the "id" attribute and use that this as the name. This results in:
match=Focus submodel=ST make=Ford
You can use multiple names too. In value of the example above, field (it uses the first match it makes sense to use "id" too. finds). This can be done by setting the name attributes to "name,id", This would cause the following output with the example above:
<pre>
model=Focus submodel=ST make=Ford
Now, the fields have names that distinguish what they are.
Note that it uses the first match it finds. That means it will look for "name" first and then "id" when the setting is "name,id".
</pre>
h2. Can I specify more than one selector (to match different things on a single page)
Yes, enter multiple selectors separated by commas. To match both span and div tags, you would enter a selector of "span,div".
h2. Can I use attributes to set the field names?
You can use the "Name Attributes" option on the Output section to tell the app to use attribute values as the field name.
For example, consider the following HTML:
<pre>
<div id="model">Focus</div>
<div name="submodel">ST</div>
<div name="make" id="car">Ford</div>
</pre>
Assuming you have the CSS selector set such that it matches all "div" tags, you would get the following output:
match=Focus match=ST match=Ford
The matches do not distinguish which div tag was set (cannot tell which field is the model, submodel or make). If the setting of the name attributes is "name", "name,id", then the app would look for the "name" attribute or the "id" attribute and use that this as the name. This results in:
match=Focus submodel=ST make=Ford
You can use multiple names too. In value of the example above, field (it uses the first match it makes sense to use "id" too. finds). This can be done by setting the name attributes to "name,id", This would cause the following output with the example above:
<pre>
model=Focus submodel=ST make=Ford
Now, the fields have names that distinguish what they are.
Note that it uses the first match it finds. That means it will look for "name" first and then "id" when the setting is "name,id".
</pre>