Copy link to clipboard
Copied
I'm looking to pre-populate a field for a Web App entry by encoding a URL that a client would click on. They would then be directed to the page that contains the Web App Entry Form and the URL encoded data would be prepopulated on the Web App Entry Form. Thanks for the help.
<a href="/car-interest-form?myvariable={tag_name_nolink}">Make Offer</a>
Use _nolink on the name if your using that in a list view layout. Fine to have just tag_name in detail view. Good to give it a proper value as well as shown.Then the module as you have. Doing so should work fine.
Copy link to clipboard
Copied
Use javascript to pull the query parameters out of the url: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values then populate the field when the page loads.
Edit - never mind, turns out the modules have a thing for that.
Copy link to clipboard
Copied
Hi Drew,
Please note that BC provide this functionality via a module {module_url,variable}.
This module's documentation is at http://kb.worldsecuresystems.com/145/bc_1455.html
Dave Black
Twitter: @webmosphere
Copy link to clipboard
Copied
Follow what Dave says here, you have that BC module to do it, do not need to do it with javascript as Ken mentioned.
Just out the module with the paramater you want as the input value of the form so...
<input type="text" value="{module_url,variable}" />
Copy link to clipboard
Copied
what about the URL where the link is coming from (code from list view in car DB web app)
<a href="/car-interest-form?car={tag_name}">Make Offer</a> I tried this and it doesn't work right.
Then on the form page
<input type="text" class="cat_textbox" id="CAT_Custom_301828" name="CAT_Custom_301828" maxlength="4000" value="{module_url,car}" />
http://newportclassiccars.businesscatalyst.com/collection To see results.
Copy link to clipboard
Copied
<a href="/car-interest-form?myvariable={tag_name_nolink}">Make Offer</a>
Use _nolink on the name if your using that in a list view layout. Fine to have just tag_name in detail view. Good to give it a proper value as well as shown.Then the module as you have. Doing so should work fine.
Copy link to clipboard
Copied
That solved it immediately! Awesome, thanks!
Copy link to clipboard
Copied