Possible to use link attribute in FormLoom form?

I would like to pass the SiteLok username through a link to a page with a FormLoom form on it, then set a hidden form field to that passed-in username.

Is this even possible?

My reply is not directly addressing your question, but did you know that Sitelok has its own contact form that can be customized to your liking (including hidden fields)?

I did, but my requirement is to post form data to MySQL. Not sure if I can do that in SiteLok?

BTW, being a newb to RW (2 weeks old!), I kinda backed into the current design … bought FormLoom, developed form connected to MySQL, … then bought SiteLok, implemented members access. But I am open to alternatives, so long as I can post to MySQL.

Set your page to be a PHP page.

Then in your hidden field value, type in this code…

<?php echo isset($_GET["username"]) ? $_GET["username"] : ""; ?>

Then via the URL in the browser pass ?username=joeworkman to the end of the URL.

I don’t see why this will not work in Formloom. This will work in a Foundation form.

1 Like

Thanks @joeworkman, I get your approach here, but FormLoom just sees the php snippet as a literal string (even when I checked the ‘Disable value escaping’ feature). Hmmm?

Message @yabdab to see if that is possible.

Sounds like you are not using a PHP page ( or PHP is not enabled ) ?

A URL would help us know for sure. :wink:

Took a step back, purchased FormSnap, hoping that a more direct stack-in-stack approach would allow me to write forms to MySQL whilst inserting variable data into a hidden field.

I set up the FomSnap Base and fields identically to the FormLoom form that I had previously created (which worked, but couldn’t figure out how to write a pass-in var to a hidden field, the original reason I started this thread). Every time I click ‘Submit’, I get “Error! You have been blocked”.

So, I created a test page with one form, 2 fields (text and hidden). Created a new database for this test and a table with 2 text fields. Checked, re-checked MySQL settings. Still getting “Error! You have been blocked” on submit.

Here is my test page: https://sophoraservices.com/page-2

In both of the cases above (FormLoom and FormSnap), I checked “Do not send email”.

Not sure what I am missing in the FormSnap setup.

Neglected to mention earlier that: I am using PHP page; and I did try your suggested fix in FormLoom, but was unable to get this working.

Send in a support ticket to proceed on this.