close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Not losing information on page1 when going back from page 2

Thread began 1/28/2019 2:20 pm by john70964 | Last modified 2/05/2019 2:03 pm by Ray Borduin | 155 views | 31 replies |

john70964

Not losing information on page1 when going back from page 2

I believe there is a way of not loosing the data on a page inserted in input fields when going back from the next page.
eg
Fill in data on page 1
Go to page 2
Go back to page 1
Data in page 1 still shows.
How is this done please?
Many thanks
John

Sign in to reply to this post

Ray BorduinWebAssist

Probably the easiest technique is to use the "Persistent form" server behavior to save the contents of the first page as it is submitted so that you can re-populate the form from the persistent values when someone returns to the page.

Sign in to reply to this post

john70964

Thanks Ray
I have two pages
Page 1 is where I fill in the data fields
Page 2 is used to send images from
I placed <?php require_once("../webassist/forms/persist.php"); ?> on line 5
of page 2 but the data was not saved on page1.

Am I on the right track?

Sign in to reply to this post

donegan

What is the form action on page 1?

You should apply the Server Behavior on the action page: Webassist->Persistence->Persist Form

That will add the include and a few lines of code to save the form.

Sign in to reply to this post

john70964

Thanks donegan
In the webassist folders I do not have a folder named > Persistance

On Page1
Line 174 <form action="<?php echo $editFormAction; ?>" name="form" method="POST">

Line 62 64
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);

Sign in to reply to this post

john70964

Hi Ray
a bit more info below

Sign in to reply to this post

Ray BorduinWebAssist

That means the page submits to itself. Apply the persist form server behavior on page1 and then bind all of the values of the form to get their content from the persistent form binding that will appear in the bindings tab.

Sign in to reply to this post

john70964

Thanks Ray
I found the persistence form in server behaviours > webassist/persistance
To insert the code
In design view I selected the field
In Bindings I selected Persistent Form then selected the same Field selected in design view
BindTo: shows input value and then select Bind

The page code shows
<input name="Manufacturer" type="text" id="Manufacturer" value="<?php echo(WA_getSavedFormValue("PersistFreeForm","Manufacturer")) ?>" /></td>

But on going back to page one the field entries are not saved.

On using the Next button I am getting 2 errors
Notice: Undefined index: Image1 in C:\xampp\htdocs\boatsforsalenow_mysqli\webassist\file_manipulation\helperphp.php on line 72

Parse error: syntax error, unexpected 'else' (T_ELSE) in C:\xampp\htdocs\boatsforsalenow_mysqli\webassist\email\WA_Email.php on line 176.

Sign in to reply to this post

Ray BorduinWebAssist

Change the persistent form server behavior to use the button press trigger instead of "always".... with always, it resets when you return to the page and makes it blank.

Attach a copy of the WA_Email.php page and I can take a look at it to see why it might have an error.

The error when you hit next sounds like it might be a trigger issue for a file upload on the second page. Make sure that is set to file upload based on the form button so it doesn't try to run right when the page loads as well.

Sign in to reply to this post

john70964

Thank you Ray

please see PM

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...