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

DataAssist created pages as plugins - passing the values

Thread began 12/12/2010 8:45 am by jshafor | Last modified 12/06/2013 11:18 am by Jason Byrnes | 4795 views | 13 replies |

jshafor

DataAssist created pages as plugins - passing the values

For starters - killer job on this extension - everyday I see it streamlining the way I work.

With that - I need a little direction.

Pages have been created with DataAssist; nothing special (insert, search, results, details, delete, update) . . .

I'm having issues loading the page correctly when it's referencing a specific item.

EXAMPLE
- The search page (....index.php? (default plugin) loads fine, no problem;
- The results page however won't display since it's looking for specified search criteria (I suspect because its a "get":
<form action="items_Results.php" method="get" name="WADASearchForm" id="WADASearchForm">)
- The dynamic plugin page I'm trying to use for the results page is ...index.php?page=itemResults; however, when I change the action on the search form from "items_Results.php" (created by DataAssist) to "...index.php?form=itemsResults" (same DataAssist page used as a plugin), it just reloads the search page.

Therefore, my question is: how do I properly and effectively use DataAssist created pages as plugins?

My goal is to run DataAssist, strip the DataAssist CSS (for the most part) and use the core code with no CSS as a plugin . . . this would be the BOMB!!

Thanks to all in advance for your input and comments.

Additional info (I know this is "old hat" for a lot of you guys - I'm still learning)

This is the string that DataAssist puts out (this if from the update page):
<form action="items_Update.php?ItemID=<?php echo(rawurlencode($row_WADAitems['ItemID'])); ?>" method="post" enctype="multipart/form-data" name="WADAUpdateForm" id="WADAUpdateForm">

The action already has ...items_Update.php?ItemID=xxx" - HOW DO I submit the form to the update page that is included on an index page as a plugin? (I don't know how to apply two ? to one string (?form= (or ?page=) and ?ItemID=) HOW DO I combine both these in one string?

Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of the index page so i can see how the plugins are applied.



for the second question, you would modify the code to pass both query string variables separated by the ampersand:
<form action="index.php?page=itemUpdate&ItemID=<?php echo(rawurlencode($row_WADAitems['ItemID'])); ?>" method="post" enctype="multipart/form-data" name="WADAUpdateForm" id="WADAUpdateForm">

Sign in to reply to this post

jshafor

index.php copy

Jason - thanks for the direction on combining the two query strings . . . I'm man enough to admit that I didn't realize that could be done. I'll give that a whirl . . . thanks!

Here's a copy of the index page in question. When I submit the product search (plugin on the index.php page) it just goes back to the index.php default screen.

Just in case you want it; I also included the search page (which is a plugin on the index.php page too)

Thank you sir!

Attached Files
PlugInHelp.zip
Sign in to reply to this post

Jason ByrnesWebAssist

hmmm, changing the forms action to:
index.php?page=itemsResults

should do the trick. if this doesnt work, please send a link so i can investigate.

Sign in to reply to this post

jshafor

Per the usual . . . you're definitely on the right track. I changed the form action to "index.php?page=itemsResults" and it appeared as if it did nothing; but that's not true. It's submitting the query string to the URL sting; it's just not processing it with the results page.

Here's what I mean: when I go to the search page (index.php?page=searchProducts) and just hit "Search", it loads the "index.php" (Home) page; HOWEVER, the URL string is:

index.php?S_ItemCat=&S_ItemName=&S_ItemLongDesc=&S_ItemPrice=&Search.x=35&Search.y=13&Search=Search

which is the search string welded to the end of the index.php page. Then, if I manually type the plugin extension (how you suggested prior about combining query's) with the ampersand:

index.php?page=itemsResults&S_ItemCat=&S_ItemName=&S_ItemLongDesc=&S_ItemPrice=&Search.x=35&Search.y=13&Search=Search

the results page loads as I want/need it to!

So, I said all that to ask this: how do I combine the Search query string with the plugin: www.index.php?page=itemsResults when I submit the search form?

Might I add that the solution for the issue above will allow DataAssist generated pages to integrate almost seamlessly with Framework Builder! Excellent!!

Thanks Jason - your help to myself and many others in the forum is absolutely invaluable.

Sign in to reply to this post

Jason ByrnesWebAssist

on the search page, add a hidden form element named page and set the value to itemsResults:

<input name="page" type="hidden" id="page" value="itemsResults" />
Sign in to reply to this post

jshafor

Per the usual - Jason fixed it!! Works perfectly my friend. Thanks again for your help!!

Sign in to reply to this post

Jason ByrnesWebAssist

Great, glad to hear it is working.

Sign in to reply to this post

Jenny I

Hi Jason

I am trying to do the exact same thing that jshafor is doing but I am stuck at the first hurdle. I watched the getting started video but I am still confused.

I have my default page which has links in the sidebar to all my insert/update/result/detail/search pages.

I need to insert the data assit plugins based on these urls Can you help me understan the following.

1. I go to > Framework Bulider> Insert Dynamic Plugin
2. Select Trigger Variable. (? no idea what that would be. In the get started tutorial $_GET["form"] is used, would I use that too?)
3. Create "variable value".(? In the get started tutorial "question" is used. I cannot undertand where that value came from and how it was created. Could you explain to me how this works?)
4. Finaaly creating the dynamic links (In the Getting Started tutorial the link ?form=question is used. Do Ineed to use ?form= to get my forms or are form and question generic/ variables?)

Your help is much appreciated.

Sign in to reply to this post

Jason ByrnesWebAssist

with a dynamic framework, you need to have a variable and value pair. usually a query string variable is used, but it could also be a session variable.


the name of the variable and value are defined by you. In the feature tour, they are using the URL variable named "form", but you can use anything you like.

form was chosen because they are using a form page, the form querystring value is determining which form will be used. if the contact page is access with out a querystring variable:
contactus.php

it will load the contact_form.php page as a plugin

if there is a form querystring variable and it is equal to question, this will trigger the question_form.php plugin page to be loaded instead:
contactus.php?form=question

you can use any variable name / value you like. in data assist, it may make sense to use "action" as the name

and set it up so that the default is the search page:
index.php - would load the search page

set the value results to load the data assist results page:
index.php?action=results

insert to load the DataAssist insert page:
index.php?action=insert

Update for the update page
index.php?action=update

delete for the delete page
index.php?action=delete

and detail for the detail page.
index.php?action=detail

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