close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

server validations questions

Thread began 7/30/2013 3:45 am by Jamie | Last modified 9/26/2013 12:24 pm by Jamie | 2822 views | 15 replies |

Jamie

server validations questions

hey Jason

Have started using server validations email (basically to avoid duplicate blog or news titles for mod_rewrite purposes).

I have a couple of questions

1. in the backend, I have set up validation show ifs for the relevant field on both the _insert and _update pages. They work fine unless you make an attempt, get the validation error text and then hit cancel. If you then go back into the page, the valideation error text is already there....

2.this isnt so much about server validations per se but what would be good practice for members section where you *could* have 2 people from the same company. I can create the permalink aspect in the database, I can get the pages to validate but obviously from a mod_rewrite perspective, I cant have 2 identical company names for 2 different peoiple...so my question is just about if it were you, how would you set it up to differentiate the 2?

Many thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

1) The validation failure is stored in a session. the session is cleared when the when validation passes. if you select the validation server behavior and go to code view, it will have the validation code block highlighted, about the 3rd line is the line that sets the failure session, it will look similar to:

$_SESSION['WAVT_index_Errors'] = "";

in this example, the validation is being applied to a page named index.php. you could add the following at the bottom of the page to clear the session:

php:
<?php if(isset($_SESSION['WAVT_index_Errors'])) unset($_SESSION['WAVT_index_Errors']); ?>



2) I would use the Unique database value validation for the permalink to prevent the same entry, the users would need to make sure to enter unique company names, perhaps add the state / province:
Widget Corp MA

vs.
Widget Corp NY

Sign in to reply to this post

Jamie

Thanks Jason

Re 1) not sure where you mean this to go as anywhere I put it, DW shows a code error

I have tried putting

<?php if(isset($_SESSION['WAVT_blogupdate_Errors'])) unset($_SESSION< /span>['WAVT_blogupdate_Errors']); ?>

before </body>, before </html> and after </html>

none of those seem to work....

Re 2) I thought that might be the case but for the sake of asking I thought there may have been something else that I could do.

Cheers

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

you have a span tag in the code:
unset($_SESSION< /span>['WAVT_blogupdate_Errors']);

should be:
unset($_SESSION['WAVT_blogupdate_Errors']);

i would put it after the </html> tag, but in reality, it doesn't matter as long as it is after the last show if block.

Sign in to reply to this post

Jamie

ooops thanks

Sign in to reply to this post

Jamie

Hey Jason

Have been adding the server validations and they all work absolutely fine until I clear the session.

Basically, what is happening (if I dont clear the session) is that when the title is duplicated the warning/error message appears but if you cancel the page and come back to it that message still shows.

When I add the clear session

servicescontentsinsert_622

it still goes to validate but and stays on the page but the message is not visible at all when it should be....

not sure what info you need to be able to see what I am doing wrong but have attached the 2 pages that this is happening on.

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

Jamie

see PM

Sign in to reply to this post

Jason ByrnesWebAssist

see PM

Sign in to reply to this post

Jamie

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