close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Convert DA Form to CSS Form

Thread began 9/30/2009 4:11 pm by Daryl | Last modified 12/08/2009 3:34 pm by Daryl | 2642 views | 16 replies |

DarylBeta Tester

Convert DA Form to CSS Form

Can someone please explain...

  If the contents of this form are to be inserted into a database, any
new fields that you have added will need to have the Insert behavior
attached to those new fields.  



Is it just a case of entering into the Insert or Upload behaviour and then changing some code in there?

Sign in to reply to this post

Jason ByrnesWebAssist

Double click the Insert Record server behavior. On the second page, you can bind columns to the form elements.

Select a column, then click the lightning bolt.

Expand the Form collection and select the corresponding form element.

Sign in to reply to this post

DarylBeta Tester

I have done this but after uploading the page, it will not load, just a blank page with no content and no error message is shown.

Also, all of the server side show regions have a red exclamation mark. When I open them in the server behaviour, there is no option to select....

Sign in to reply to this post

DarylBeta Tester

OK, the white page now has an error message - I had to add an additional php.ini file to turn on error reporting after I upgraded to php5

I also re-ran the CSS Form Wizard and now all of the red '!' are gone

But now I am getting a PHP Error.


  Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/sites/...... /Qualified_Team_Insert.php on line 497  



Here is lines 495 - 498

php:
<select class="formMenufield_Large" name="handler_name" id="handler_name" tabindex="1" onBlur="hideServerError('handler_name_ServerError');">

<option value=""<?php if (!(strcmp("",(isset($_GET["invalid"])?ValidatedField("qualifiedteaminsert","handler_name"):"")))) {echo "selected=\"selected\"";} ?>>Please Select a Handler</option>
<option value="<?php echo $row_WADADynListhandler['id']?><?php if (!(strcmp("<?php echo $row_WADADynListhandler['id']?>", (isset($_GET["invalid"])?ValidatedField("qualifiedteaminsert","handler_name"):"")))) {echo "selected=\"selected\"";} ?>><?php echo $row_WADADynListhandler['handler_f_name']?></option>
</select>



I am a little confused as this is all created by WA CSSFB

Anyone?

Sign in to reply to this post

DarylBeta Tester

According to Eclipse there is an unexpected ')', but I cant find it as they all seem to match.

In NetBeans it suggests that there should be a ${ somewhere but have no idea where.

Sign in to reply to this post

DarylBeta Tester

OK, I have managed to get the page to load now, by changing;

php:
<option value="<?php echo $row_WADADynListhandler['id']?><?php if (!(strcmp("<?php echo $row_WADADynListhandler['id']?>", (isset($_GET["invalid"])?ValidatedField("qualifiedteaminsert","handler_name"):"")))) {echo "selected=\"selected\"";} ?>><?php echo $row_WADADynListhandler['handler_f_name']?></option>



to

php:
<option value="<?php echo $row_WADADynListhandler['id']?><?php if (!(strcmp($row_WADADynListhandler['id'], (isset($_GET["invalid"])?ValidatedField("qualifiedteaminsert","handler_name"):"")))) {echo "selected=\"selected\"";} ?>><?php echo $row_WADADynListhandler['handler_f_name']?></option>



I haven't tested the page yet, but was wondering why WA CSS Form Builder was creating the original code....?

Sign in to reply to this post

Jason ByrnesWebAssist

I have tried recreating the problem and am not able to. To be honest, I cant say why the code was generated that way. can you try recreating the issue on a new form? If you can recreate the issue again, I will crate a ticket so we can investigate the problem.

Sign in to reply to this post

DarylBeta Tester

I will have a go this evening and will get back to you.

Sign in to reply to this post

DarylBeta Tester

I am getting the following error on a new form.

  Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/sites/lsdogs.org.uk/public_html/Members/Handler_Insert2.php on line 275  



The code is;

php:
<select class="formMenufield_Medium" name="unit" id="unit" tabindex="4" onBlur="hideServerError('unit_ServerError');">
                  <option value="" <?php if (!(strcmp("", (isset($_GET["invalid"])?ValidatedField("HandlerInsert","unit"):"")))) {echo "selected=\"selected\"";} ?>>Please Select a Unit</option>
                  <option value="<?php echo $row_WADADynListunits['unit_id']?><?php if (!(strcmp("<?php echo $row_WADADynListunits['unit_id']?>", (isset($_GET["invalid"])?ValidatedField("HandlerInsert","unit"):"")))) {echo "selected=\"selected\"";} ?>><?php echo $row_WADADynListunits['unit_name']?></option>
                </select>



I tried my fix which didn't help, I just got unexpected "," error messages.

Any ideas?

It just seems to be code created by CSS Form Builder when converting a DA form where a dropdown is used.

Sign in to reply to this post

Jason ByrnesWebAssist

I believe the code should be:

php:
<select class="formMenufield_Medium" name="unit" id="unit" tabindex="4" onBlur="hideServerError('unit_ServerError');">

                  <option value="" <?php if (!(strcmp("", (isset($_GET["invalid"])?ValidatedField("HandlerInsert","unit"):"")))) {echo "selected=\"selected\"";} ?>>Please Select a Unit</option>
                  <option value="<?php echo $row_WADADynListunits['unit_id']?><?php if (!(strcmp("". echo $row_WADADynListunits['unit_id']."", (isset($_GET["invalid"])?ValidatedField("HandlerInsert","unit"):"")))) {echo "selected=\"selected\"";} ?>><?php echo $row_WADADynListunits['unit_name']?></option>
                </select>
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...