Jump to content
  • 0

Copy search field value to input field


Philippe
 Share

Question

Hi there,

On a report how I can copy the field value of my search once I click on Search  into a data entry field. In the attach screenshot when I search my EventID I would like this value to be automatically copied the EventID input field below. Also when I click on Add to create a record based on my selection how can I keep the same EventID until I search for an another event?

Thanks,

Screenshot 2019-06-07 at 22.14.46.png

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

On your search page for Event ID under the advanced tab, you can check to pass the value to next page. Then on " Search and Report Wizard - Configure Results Page Fields "  screen, change the form element of this field to hidden so you can check to receive this value from the search page.  If itis not hidden you will not have receive/pass parameter options

Link to comment
Share on other sites

  • 0
18 minutes ago, MayMusic said:

On your search page for Event ID under the advanced tab, you can check to pass the value to next page. Then on " Search and Report Wizard - Configure Results Page Fields "  screen, change the form element of this field to hidden so you can check to receive this value from the search page.  If itis not hidden you will not have receive/pass parameter options

Thanks for your quick response, tbis is  not a 2 page report - I use the one Display search form above the result,  and don't have pass value to next page!

Link to comment
Share on other sites

  • 0

Hi @philippe,

You can use Javascript for this. 

First, you need to pass the parameter from the search form. 

image.png.5261a22b0d82086afbebb9e56b2de195.png

Then inside your Results Page, add a Header and Footer.

Put this code inside your footer (make sure to disable HTML Editor)

<script>

// Replace Value to Parameter name
var passID = '[@Name]';
// Replace Value to the Field Name of Event ID inside table
var this_field= 'Name';

var insert_field = document.querySelector('form[action*="[@cbAppKey]"] #InlineAdd' + this_field);
insert_field.value = passID;

</script>

 

Just a little something I learned from this post: 

Thanks Mahfriend :lol:

Sample Page: https://c0acd927.caspio.com/dp/e6cb6000e2c14d25606f4cd1ae1b

I hope this helps.

Glitch.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...