You are viewing limited content. For full access, please sign in.

Question

Question

Renaming the "Auto Fill" Lookup Button and Moving its Location

asked on March 19, 2014

What would be the proper way to rename the "Auto Fill" text on the button that appears when more than one condition exists for a lookup?

 

Also, the button seems to appear beside the first field of a lookup, when I'd like the button to appear beside the second field (so that both fields must be entered before the user clicks on the button).

 

Thanks!

1 0

Answer

APPROVED ANSWER SELECTED ANSWER
replied on March 19, 2014 Show version history

Changing the auto-fill button text:

 

$(document).ready(function () {
  $('.autofill').text('Whatever you want goes here');
});

If you have auto-fill buttons that appear after the form initially loads, you'll need to run this line of code again when those buttons appear.

2 0

Replies

replied on March 19, 2014

You may want to look at seeing if you can do away with the auto fill button altogether. We decided that our users would find it more of a hassle to have to click the button, so we inquired about it and this is a solution we were given. 

1 0
replied on March 19, 2014

Forms team will consider allow the "Auto Fill" button text to be customizable in the future. For the button position, it should always be shown by the field in the last position, please open a support case if it doesn't work as expected.

1 0
replied on March 19, 2014 Show version history

Hi Lena,

 

I've figured out that it places the Auto Fill button next to the field with the higher "q" number, regardless what order you decided to place the fields afterwards.  I just had to modify the fields by switching their labels/variables to place the q#'s in proper sequence for the button to display beside the second field.

 

As for changing the text on the Auto Fill button, I've done this before in the past with the help of someone from Laserfiche but it wasn't recorded in this answers.laserfiche.com site and of course I can't find the original answer.  Is it not something as simple and similar as:

 

$('.autofill').value = "...";

 

This obviously doesn't work, but I imagine it's not too far off from this.

0 0
APPROVED ANSWER SELECTED ANSWER
replied on March 19, 2014 Show version history

Changing the auto-fill button text:

 

$(document).ready(function () {
  $('.autofill').text('Whatever you want goes here');
});

If you have auto-fill buttons that appear after the form initially loads, you'll need to run this line of code again when those buttons appear.

2 0
replied on March 19, 2014

Thank you Eric, this worked.

0 0
replied on May 21, 2017

Thanks for the Javascript for renaming the Auto Fill button. This works for us when Previewing the form or Starting the form form the process diagram screen.

But when entering the url of the form OR clicking the Start process within the forms portal the button is named Auto Fill. Any ideas how to prevent this?

2 0
replied on October 26, 2017

Grant did you ever find a resolution? We have the same issue- the Auto Fill button rename javascript code works in preview but not the web client.

0 0
replied on October 26, 2017

No Peter, I wasn't able to resolve this.

Can anyone from Laserfiche assist?

0 0
replied on October 30, 2017

We ended up using CSS to fix the issue.  We wanted the button to be labeled "Search" and to have a different color and location.  First we had to make the original hidden then applied an "after" to set up the button label and look.  Hope this helps resolve your issue too.

button {
    visibility: hidden;
    position: relative;
    border: 1px solid black;
}

button:after {
    visibility: visible;
    position: absolute;
    content: "Search";
    border: 1px solid lightgray;
    padding-top:5px;
    border-radius: 5px;
      background-color: #303382;
    color: white;
    width: 100px;
    height: 35px;
    margin-top: -7px;
    margin-left: -25px;
}

button:hover:after {
     background-color: darkgray;
    border: solid 1px #777777;
}
 

1 0
replied on January 24, 2018

Paula, I just wanted to note that you may want to refer to your button as .autofill instead. Using "button" changes all buttons (Draft on the form and when you submit the download, print, etc buttons).

Other than that it works great! Thank you!

 

autofill.PNG
autofill.PNG (22.31 KB)
0 0
replied on January 26, 2018

Thanks for the tip!  I've made the change.

0 0
replied on April 20, 2023

In Forms 11 with the new designer, this is what I used...

.auto-fill-btn-container button.ng-star-inserted {
    visibility: hidden;
    position: relative;
    border: 1px solid black;
}
.auto-fill-btn-container button.ng-star-inserted:after {
    visibility: visible;
    position: absolute;
    content: "Lookup Account";
    border: 1px solid lightgray;
    padding-top:5px;
    border-radius: 5px;
      background-color: #303382;
    color: white;
    width: 120px;
    height: 30px;
    margin-top: -7px;
    margin-left: -25px;
}
.auto-fill-btn-container button.ng-star-inserted:hover:after {
     background-color: darkgray;
    border: solid 1px #777777;
}

 

2 0
replied on July 2, 2024

Thanks Luke!  Your response helped me rename / resize my button and it looks so much better.  Hard to find how to do this using the modern form designer and CSS was the key.

0 0
replied on February 12, 2018 Show version history

I know this post is rather old but to add my two cents.  You can customize and change location of a lookup rule by using Custom HTML.

In your custom HTML field, put:

<div align="center"><style>
.autofill {
    display:block;
    float:center;
    background-color:#444444;
    border: none;
    color: white;
    padding: 10px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.autofill:hover{
  background-color:darkgray;
}

</style></div>

<center><button id="lookup79" class="autofill" type="button"> Name of Your button </button></center>

And in Javascript, you can hide the native autofill button.

$(document).ready(function(){
  
  $('#lookup79').hide();//hide native autofill button for rule 79

});

 

1 0
replied on March 19, 2014

should be able to refer to it by name.

 

For CSS

.autofill

or for Javascript

$('.autofill')

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.