• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Auto checkboxes poulate data when checked

Explorer ,
Mar 25, 2022 Mar 25, 2022

Copy link to clipboard

Copied

I am creating a fillable catalog, please attached, there are 100+ items my idea is when the user clicks any product check box product ID, product and qty and cost, etc will auto-populate at the end of the catalog on the last page. 

I have this piece of code but am not sure how to tweak it to work in my scenario. 

event.value = 0;if (this.getField("checkbox1").value!="Off") event.value=500;else if (this.getField("fullpageadregular").value!="Off") event.value=700;


PS: I have the cost of the product which I can add to that column. 

 

catalog.pngrequest form.png

TOPICS
Create PDFs , Edit and convert PDFs , How to , JavaScript , PDF forms

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2022 Mar 26, 2022

Copy link to clipboard

Copied

How can you auto-populate the quantity?

Isn't it the user's choice?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 26, 2022 Mar 26, 2022

Copy link to clipboard

Copied

No meant to auto calculate the qty with price so whatever qty user input will be auto multiply by price which I already have.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 26, 2022 Mar 26, 2022

Copy link to clipboard

Copied

Here is the update list with price of each item. 

 

 

Screenshot 2022-03-26 201405.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 31, 2022 Mar 31, 2022

Copy link to clipboard

Copied

Hi,
Is it possible for you to share the page at the end of the catalog where you want to indicate the products.
Retrieving data from the spreadsheet when checking a box is not the most complicated. How is the last page of your document where the checked items should appear?
The difficulty of the script will come from the layout of this step!

@+

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 31, 2022 Mar 31, 2022

Copy link to clipboard

Copied

Hi @bebarth Thanks for your reply, actually end list of items when clicked on checkboxes is the same as the above screenshot e.g product, item, dimension, qty, cost, etc. 

PS: One update is I am now using the same text boxes for qty boxes at the end of the list and at catalog with the same qty will reflect when user put qty so now there are no checkboxes just text boxes with the same name. 

 

qty.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 31, 2022 Mar 31, 2022

Copy link to clipboard

Copied

Is it possible for you to share your catalog or an abstract? This would be easier to understand how it was made.
I send you a personal message.

@+

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 01, 2022 Apr 01, 2022

Copy link to clipboard

Copied

Sure, here is the Link so please note that I am currently creating two same text fields with the same name one for the quote form and one for the catalog area for the user to put their desired quantity and calculate at cost columns and the price will be a simplified tab with textbox name * price but this process taking too much time as there are 150 pages with 600+ items in this catalog, so my question is there is a better way to achieve this results with less time? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 02, 2022 Apr 02, 2022

Copy link to clipboard

Copied

I wrote a script to generate the quantity field always at the same distance on top and centered of the reference.

I need some catalog pages for checking the position of items. At the moment if I suppose the clearance between the reference and the quantity field is always the same, the quantity field is sometime over the picture.

Capture_d’écran_2022-04-02_à_22_46_44.png

Do you know if the position of the pictures are always the same on every catalog pages?

@+

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 03, 2022 Apr 03, 2022

Copy link to clipboard

Copied

Thanks for your reply and really appreciate it, as you asked the distance each time each other is different but I am okay with it and I can manually adjust rather than place them manually, here are some catalog pages in case you need to see. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

Hi,

Here is my answer and how to use it from the file I'll send you via your personal address.

You will copy then past in your file the "GENERATE FIELDS" button and import the .csv file saved from your Excel file where I added (fictive) prices.

Then you will click on the "GENERATE FIELDS" button.

Capture_d’écran_2022-04-05_à_12_31_23.png

Capture_d’écran_2022-04-05_à_12_37_35.png

All fields will be generated at a fixed place according to the reference.

In the example I did, more than 1600 fields have been created on 124 pages in less than 1 minute.

Capture_d’écran_2022-04-05_à_12_36_29.png

Then, when you enter a quantity in the field then you go the the relative page of the list,

Capture_d’écran_2022-04-05_à_12_40_40.png

the price quantity and price will be indicated.

Capture_d’écran_2022-04-05_à_12_40_12.png

It is unfortunate that the layout of the catalog was not more rigorous, it would not have been necessary to replace the fields that come above the images.

Capture_d’écran_2022-04-05_à_12_40_40_1.png

I suggest you did a test on a copy of your file, then you will be able to modify some variables in the script to adjust the position of the fields.

Capture_d’écran_2022-04-05_à_13_21_22.png

@+

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 05, 2022 Apr 05, 2022

Copy link to clipboard

Copied

LATEST

Hi @bebarth I really appreciate your hard work on this script, so I just tried to update the .csv file but was not sure how to edit the file so that I can update it to reflect the actual price? 

also, is this possible to put a placeholder "QTY" on each field just like I previously had this is a kind of requirement from this person or this catalog guy? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines