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 7670733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:53:26+00:00 2026-05-31T15:53:26+00:00

I dont seem to be able to understand how to get the form data

  • 0

I dont seem to be able to understand how to get the form data with heist.
I just started looking into Haskell web frameworks but documentation is a bit … scarce, to say the least. There is no mention of forms in the skinny heist tutorial on the snap website.
So given a simple html form, how do I get the form data for processing into my handler function? Can anyone point me to a tutorial, google just keeps quiet on this one? Or maybe a short example …

Also, where do I get information on the conditional control? Say, if I want conditionally include certain parts of the html within my page, how do I do it with heist? Basically, where is the “if”?

Thanks

  • 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-31T15:53:27+00:00Added an answer on May 31, 2026 at 3:53 pm

    See Using digestive functors with Heist for a good tutorial on simple forms, and mightybyte’s musings about heist. If you’re planning on using multipart/form-data use the Snap.Util.FileUploads module.

    You could use a Splice to generate content based on a condition.
    A Splice returns a list of Node‘s,

    mySplice = do
      -- get environment conditions
      -- condition could be passed in as a parameter 
      if condition 
         then return [] -- do nothing
         else return [TextNode "some content"] -- see Text.XmlHtml
    

    You would then bind this splice to a tag using something like:

    bindSplice myTag mysplice defaultHeistState

    And place <myTag/> in your template. When Heist renders the template, it will evaluate the splice when it encounters the tag and insert the value in its place.

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

Sidebar

Related Questions

I dont seem to be able to find any evidence of multiple groupby being
Are you able with the grooveshark api to get a songs data and play
I don't seem to be able to find any authoritative, up-to-date (i.e. for 1.0
Is there a destructor for Java? I don't seem to be able to find
This must be a very simple question, but I don't seem to be able
I'm not good at C# at all, I just don't get the logics. But
I'm just getting started with Hibernate, and all the examples I'm seeing so far
I'm trying to understand how to use WCF Data Services (based on EF 4.1)
I am able to understand preorder traversal without using recursion, but I'm having a
I am trying to get OpenHardwareMonitor to read temperature data out of the Winbond

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.