close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to display hidden fields

Thread began 1/22/2010 3:26 am by info58953 | Last modified 1/29/2010 2:23 pm by Jimmy Wu | 5475 views | 9 replies |

info58953

How to display hidden fields

After viewing Mark Fletchers video instruction the Cookies Toolkit works fine. I intend to use a confirmation page after customer filled in a form. So I want to display all form fields on a next page, but without the border and therefore without the possibility to edit the fields. Please see my code below and my question is what code needs to be on the *****? Anyone a suggestion for me?

<body onload="WA_getFormCookie(WA_CookieObj,document.form2,'WAFC_formulier_formulier')">

<form id="form2" name="form2" method="post" action="">
<p>
<label>Naam
<input type="text" name="Naam" id="Name" />
</label>
<label>Plaats
<input type="text" name="Plaats" id="Place" />
</label>
</p>
</form>
<form id="form1" name="form1" method="post" action="">
<p>
<input name="hiddenField" type="hidden" id="hiddenField" value="Name" />
<input name="hiddenField2" type="hidden" id="hiddenField2" value="Place" />
</p>
</form>

The hidden field (hiddenField) contains: *********
The hidden field (HiddenField2) contains: *********

</body>

Sign in to reply to this post

Jimmy Wu

On the next page you will have to add the form bindings to the page from your first page. On the second page, open the bindings panel and click the "+" button. Then select Form Data. In the interface, choose the page you want the form data added from. Then you will be able to drag and drop the form variables onto the page to display them.

Sign in to reply to this post

info58953

Thanks for your answer Jimmy, this will work for some parts I need but I was not clearly enough telling what I need. So I will try to explain it.

Customers fills in an order form and in one of the fields the total amount is calculated depending on the number of products ordered. Before customer clicks on the “Order Now” button the total amount is shown in te order form with the next code:

<p>Total amount is: <input name="Totaal" type="text" id="Totaal" size="6"> euro.</p>

The amount variable is correctly saved with Cookie Toolkit.

After clicking the “Order Now” button a next page is shown and there customer only has to choose his preferred method of payment. No other information needs to be shown or edited. Depending of customers choice he will be forwarded to a payment provider. The payment provider needs to know the total amount and expects to receive a variable they call $amount.

There’s my problem, on page two (“choose payment method”) variable $amount must be filled with the cookie I’ve saved on the page with the order form.

Sign in to reply to this post

Jimmy Wu

When you have cookies toolkit installed, you can display the value stored in a cookie by going to Insert->WebAssist->Display Cookie. Using this, you can display the correct amount on the page.

Sign in to reply to this post

info58953

Thanks for the reply Jimmy, but I seems not to work. I use next test code to get the cookie and display it in a form:

<body onload="WA_getFormCookie(WA_CookieObj,document.form2,'WAFC_formulier_formulier')">
<form id="form2" name="form2" method="post" action="">
<label>Naam
<input type="text" name="Naam" id="Naam" />
</label>
</form>
<br />
<form id="form1" name="form1" method="post" action="">
<input name="hiddenField" type="hidden" id="hiddenField" value="Naam" />
</form>

This works fine, no problem. Further on the same page I've inserted (Insert->WebAssist->Display Cookie) as mentioned in your last posting to display "Naam". Cookies Toolkit adds next part of code to the page:

<script name="WACookieDis">
document.write(WA_CookieObj.getValue("Naam"));
</script>

Unfortunately this does not display anything :-(

Sign in to reply to this post

Jimmy Wu

Have you stored anything into the cookie named naam? There should be a setcookie call somewhere on the page if you are setting something to a cookie.

Sign in to reply to this post

info58953

I supposed storing the entire form would do the job, as I read and see now a "set cookie value" for "naam" is needed for displaying it on the next page. Am I right? It works on my pages so I think I am ;-)

Sign in to reply to this post

Jimmy Wu

You stored the entire form contents into one cookie, not separate cookies, therefore, there is no cookie named naam. The cookie that stored the form information is called:
WAFC_formulier_formulier

Therefore, you would have to store the naam form element in a separate cookie and display that cookie. To set that cookie, go to the server behavior panel and click on the '+' button and go to the WA Cookies Toolkit section and select the Set Cookie Value server behavior. Name the cookie what you would like it to be named and how long you want it stored for and in the Value field, click on the lightning bolt button next to the input box and select the naam input box from the form. Then you can use the display cookie using the name you chose for the cookie.

Sign in to reply to this post

info58953

Thanks, this works fine now.

Sign in to reply to this post

Jimmy Wu

Great to hear it. I'm glad it was just a minor misunderstanding. If you run into any additional issues, feel free to open a new thread.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...