copying a certain text from a website page and automatically inserting it into the field

146 views
Skip to first unread message

karl ikolu

unread,
Jun 13, 2023, 6:14:50 AM6/13/23
to Autofill Extension
Good afternoon, please tell me if it is possible to insert text + value from this particular page of the site (text) into this form when opening a certain site where there is a form for autocomplete. Let's say I open an ad site, and when opening each ad, I need to copy the name of the ad and automatically insert the form in the field on this page.

CL HB

unread,
Jul 2, 2023, 3:26:58 PM7/2/23
to Autofill Extension
You can capture the value of an element on the page (either hidden or displayed) by creating a rule with Type Javascript.
First you need to identify the ids of the element that has the text you want to copy, and the element/field you want to fill:
right-click on each of these on the screen and select Inspect - the element will be highlighted so you just need to note the id (look for id="??????")
Now create your rule with Type= Javascript
Option 1 : copy the text with no change:
var myText = document.getElementById('id_of_text_you_are_copying').value;
document.getElementById('id_of_text_you_want_to_fill').value = myText;

Option 2: copy the text prefixed by the text "Ad name: ":
var myText = document.getElementById('id_of_text_you_are_copying').value;
document.getElementById('id_of_text_you_want_to_fill').value ="Ad name: " + myText;
Reply all
Reply to author
Forward
0 new messages