How to make form like example - wordpress

there is this site https://www.delinski.at/ and it has a nice form where you can pick some values from dropdowns like Date, Number of Persons etc., and then submit the form. It redirects and I see the values on the redirected page link as parameters (if I have changed the defaults).
I searched for and tried several Form Plugins which all do not seem to work - most recent one (Form Maker) lets me design the form as I want but at the end I realized when I click on Submit, the values are not transfered to the target page (confirmed by Form Maker Support as work as intended). It's confusing because actually that should be a basic funciontality of a HTML form, right?
So I want to know if there are plugins where I can get a similar look&feel like the example given above.

That site is a Static Site Generated framework not WordPress. That site would also be very expensive to build cause that is all coded, and very well:)
You are not actually seeing a form there at all that is just how PHP natively uses the URL to navigate via a button.
Almost all the form plug ins for WP use the database write now and do not pass the parameters of the entered form as a php _ POST with a redirect.
I kind of think what you really are looking for is a faceted search feature
One of the best that comes to my mind is https://facetwp.com/demo/cars/?_vehicle_type=truck
Notice the car icons those are actually search buttons:) Of course you will have to build a template to do that neat stuff on the SSG site you linked but...
here is a really informative write upon how it works to get started.

Related

The Wordpress Contact Form 7 shortcode space before the id is causing 404 issues after the graphical editors truncate it

I have encountered a strange hiccup with a Wordpress site that has a graphical editor requirement (Tatsu). It is 97% mature, and of course there is now a problem.
Contact Form 7 was used to create a simple form capable of accepting a file attachment. With the classic editor the form embeds and functions without issue. With Tatsu and a couple of other graphical editors the form works as embedded with their formatting and in all preview modes...until it is saved by the graphical editor. Then we see the 404 error for the form.
If I use a traditional wordpress form, the embed is successful in both traditional editors and the graphical editors. What I have found is the Contact Form 7 (form) has a space in the shortcode whereas the traditional Wordpress forms do not. Example. I can't use the traditional Wordpress form for the file upload form because it requires an expensive paid version to accept the file upload and that PRO version isn't in the budget.
It appears as though the graphical editors are truncating the form's shortcode leading to the 404.
I tried modifying the page's code and was moderately successful, until the required graphics-editor re-saves the page and chops off the form's shortcode. When the graphical editor sees the space in the shortcode, it appears to truncate the shortcode leading to the 404 error. I can switch back to the classic editor and see the modified shortcode--the truncation. With the classic editor I can correct it, but the formatting of the page is wonky until it is opened and re-saved by the graphical editor (Tatsu)...then the formatting is spot on but the form is broken.
-I tried the default wordpress form generator, but making the file upload happen required a costly PRO subscription.
I think I'm searching for the wrong thing based on buzzword mismatches. I've looked for how to alias a shortcode (I was thinking I could create a different form shortcode without a space and point to the Contact Form 7 shortcode with a space), but most information I find in that approach is lower-level concerning form fields.
A more direct approach--I thought about modifying the shortcode, but can't find where the auto-generated form shortcodes are stored to attempt modification for the subject form's shortcode.
A more aggressive approach--I tried a do_shortcode php approach, but it did not work.
For grins I tried %20 in the shortcode reference, but met the same demise...404. Suggestions to get past the hump are appreciated.
I worked with this in several combinations through the day. I really dislike what some of these editors are doing to conform to their own style, but I understand.
The solution I found--there is another editor called PageSlayer. Unlike the Classic editor, it allowed me to edit the html and save it precisely, preserving the style of the graphical interface. This isn't a good solution because when anyone else goes into the graphical interface (Tatsu) to edit something they will lose the form...but it looks right and plays right this moment.
I have sent a request to support Contact Forms 7 to Tatsu. Thanks for the time!

Adding Google's standard search (not custom) to my website

My intention is to embed Google results in my website. I don't want to customise the domain/s on which the search is performed or anything, just a 'bog standard' Google search based on search parameters I pass it.
2 questions:
How do I display google results on my website as a response to search criteria entered into a textbox I have?
Is there any legislation I need to take into account?
I know my second question sounds rather strange but I'm aware that what I'm appearing to do here is present content driven by Google as though it's my own so want to avoid breaching any copyright or 'same-origin policy' type thing.
What I've Tried/Ways I Know I Could Achieve This
Screen scraping Google's response to a simple web request with the necessary query parameters (but seems a bit excessive)
Google's custom search (but I don't want to customise anything)
I've tagged this question for some more context.
As it is mentioned here
you can use your own XML parser to customize the display for your
search users.
with an http request like this:
GET /search?q=bill+material&output=xml&client=test&site=operations
But it has a limitation on number of requests per day, 500 or 1000 I guess.
Custom Search can be configured to include the entire Web in its results:
From the Google Custom Search homepage, click New search engine.
In the Sites to Search box, enter at least one valid URL (e.g. www.google.com).
Click Create.
On the next page, under Optional next steps, click Edit.
On the Basics tab, under Search Preferences, select Search the entire web but emphasize included sites.
Click Save Changes.
In the left-hand menu, under Control Panel, click Sites.
Delete the site you entered during the initial setup process.

Drupal Embedded views not working correctly

I recently took over a site from someone else at a new company. Having never used Drupal before, updating things has been a bit cumbersome. There were some outstanding security updates that I applied(but I haven't updated the core yet). Anyway, after doing this, the calls to views_embeded_view have not been working. For example:
print views_embed_view('news_block');
Will break the links(by using the title, rather than alias for the link), or it will link correctly, but not follow the paging rules I have set(show 1 page, 6 items per page) instead it shows 10 items and has links for other pages.
I am not sure if the update has anything to do with it, but it seems likely. Would updating the core resolve this issue potentially?
The first argument of views_embed_view is view name, the second one is display id. If display_id is not provided, 'default' is used. Make sure that you are displaying the correct display. (i.e. default can be configured differently than some other display which you actually wish to see)

Webscraping a tricky asp.net page

The overall goal is to perform a search on the following webpage http://www.cma-cgm.com/eBusiness/Tracking/Default.aspx with a container value of CMAU1173561. I have tried two approaches, the php extension cURL and python's mechanized. The php approached involves a performing a POST submit using the input fields found on the page (NOTE: These are really ugly on the asp.net page). The returned page does not contain any of the search results. The second approaches involves using python's mechanize module. In this approach I load the page, select the form, then change the text field ctl00$ContentPlaceBody$TextSearch to the container value. When I load the response again no search results.
I am at a really dead end. Any help would be appreciate because as it stands my next step is to become a asp.net expertm which i perfer not to.
The source of that page is pretty scary (giant viewstate, tables all over the place, inline CSS, styles that look like they were copied from Word).
Regardless...an ASP.Net form still passes the same raw data to the server as any other form (though it is abstracted to the developer).
It's very possible that you are missing the cookies which go along with the request. If the search page (or any piece of the site) uses session state, the ASP.Net session cookie must be included in the request. You will be able to tell it from its name (contains "asp.net" and "session").
I assume that you have used a tool like Firebug or Chrome to view the complete outgoing request when the page is submitted. From my quick test, it looks like the request may be performed with a GET, not a POST. I submitted a form, looked at the request, and pasted the URL into a new browser window.
Example: http://www.cma-cgm.com/eBusiness/Tracking/Default.aspx?ContNum=CMAU1173561&T=57201202648
This may be all you need to do.

History back to posted form without warnings in IE?

I have a search page published in a cms that locates database driven pages hosted in but not managed by the cms.
The search form consists of a number of different buttons and dropdowns. It works with a postback.
In the results listing, there are links to the resulting pages.
Is it possible (without changing from postback to a GET form) to make the back button work in IE such that I can click one of the result items and then get back to the result listing?
Currently when I click back I get the "Web page has expired".
Is it possible to do something smart with headers or redirects? I want to be able to history back to the search result in IE 8 and 9.
No, you will need to follow a POST-REDIRECT-GET pattern instead.
See:
http://en.wikipedia.org/wiki/Post/Redirect/Get
http://blog.simonlovely.com/archive/2008/11/26/post-redirect-get-pattern-in-mvc.aspx (shameless plug for implementing in MS MVC framework)

Resources