show Error on the edit view and detail view

This is small problem is bugging me …
where to write the code ???
what to write for show is error on the edit view and detail view???

convert_c is a dropdown value is “yes” and “no”
Payment_status is dropdown value is “pending” and “completed”.

When convert_c is “yes” and payment_status is “Pending”.

click on save error has to show "Payment is not completed "

Please help …

Thank you.

As I have already told you in another thread you should start reading the manual:
Instead of before_save, you may use a different type of logick hook. You will just have to echo the javascript. The javascript may be inside your logic hook method or in a separate file.

I also pointed you at a custom module wich is a basis to create easily logic hooks.

Modify the code per your needs and then you just have to upload it with Module Loader.

Alternatively you can follow these guides (or many more):

1 Like