Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4574756
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:58:01+00:00 2026-05-21T19:58:01+00:00

What I want to do is use a form gen form that calls a

  • 0

What I want to do is use a form gen form that calls a custom script adapter.
The script will then take the search field and mess with it and plug it into an sql method called sms that searches a mysql database.
All I need to figure out is how to display the results in a page.

here is the script so far

  
#  ploneformgen = PloneFormGen object
request = container.REQUEST
form = request.form
RESPONSE = request.RESPONSE
if form.has_key('string-1') and form.has_key('form.submitted'):
    srch=form['search-1'], "%s" %'\%' 
    context.sms(srch)

I need the results of context.sms() to be formatted and passed to a page template or somthing.

I used the traverse_to:string: method once to get a custom page template to appear after but I dont know how to pass my own data in.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:58:02+00:00Added an answer on May 21, 2026 at 7:58 pm
    I used the traverse_to:string: method once to get a custom page template to 
    appear after but I dont know how to pass my own data in.
    

    Inside your template you can call arbitrary scripts (or other callable code like browser views) in general through acquisition. If your code is located inside a script foo then
    use something like

    <tal:def define="result context/foo">
    
      <div tal:content="result/data1" />
      <div tal:content="result/data2" />
    
    </tal:foo>
    

    Inside the implementation of the foo script you just have to return the data that you need in the template. Usually you may return a dict e.g. with keys data1 or data2 holding the values to be rendered.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use a form that has two submit buttons. Each button calls
I want use page that has this form: <form method=post action=modules.php?name=search> <input onkeypress=FKeyPress(this); onkeydown=FKeyDown(this);
I'm using Ext.Form.Panel successfully but I want to use Ext.form.field.File this time. I was
I want to use a form select-field for users to select their country of
I have developed MVC web app. Now, I want to use custom form authentication
i want to use facebook's fb:dialog tag to display a simple pop-up form for
the company I work for want to use a hosted payment form to charge
I have this easy little form in my JavaFX application. I want to use
i have two text inputs like the following, i don't want to use <form>
I want use jQuery in my project. I know the javascript_include_tag calls the jQuery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.