close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

post variables from bindings panel

Thread began 8/10/2011 4:39 pm by AlaskaTom | Last modified 8/11/2011 7:03 am by Jason Byrnes | 1331 views | 3 replies |

AlaskaTomBeta Tester

post variables from bindings panel

This is something that bugged me forever, and I was wondering if there is a solution.

WA extensions always add form variables to the bindings panel, which is fantastic.
However, those variables are not 'translated' in DW design view.
ie they show up as little 'php' squares, instead of {POST.variable}.
If I add the form variable directly to the bindings panel manually, using the plus icon, it works fine.

The only difference is the format of the generated code.
WA puts the post variable in the format
<?php echo((isset($_POST["variable"]))?$_POST["variable"]:"") ?>

Where the default DW way displays as
<?php echo $_POST["firstname"] ?>

Either way works fine programatically, but its just nice to see the translated value in DW instead of the little php square.

Is there a fix, or a setting I have wrong?

Thanks!
Tom

Sign in to reply to this post

Jason ByrnesWebAssist

no, there is not a fix for this, DW does not translate the syntax we use:
<?php echo((isset($_POST["variable"]))?$_POST["variable"]:"") ?>

as a post variable.

the reason we use this syntax is to prevent PHP errors from occurring.

if you use the Dreamweaver Syntax:
<?php echo $_POST["firstname"] ?>

a error will occur on the page if the firstname POST variable does not exist.

we use the isset syntax:
<?php echo((isset($_POST["variable"]))?$_POST["variable"]:"") ?>

to prevent that from happening.

Sign in to reply to this post

AlaskaTomBeta Tester

I am sorry to hear that! I was hoping there was some simple fix.
I often manually enter the form elements into the bindings to prevent that.

You would have to have your error reporting set pretty low for that to trigger a error, though, since its a just a warning, not a fatal error.

Thanks for the quick response!

Tom

Sign in to reply to this post

Jason ByrnesWebAssist

during development, i always leave my error reporting set to E_ALL (Show All Errors and Warnings). using the isset() method prevents errors that would break the redirects in the server behaviors.

Sign in to reply to this post

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