We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11041
    • 82 Posts
    Hello all,

    I have been absent for a while, and things have ground to a halt. However things are looking on the up again and I am slowly starting to get going again.

    I was wondering if anyone here was talented in the field of coding php and xml. I am needing a snippet, and although a huge mountain for me to climb, being completely php and xml illiterate, I am sure and know that this is only a small project for someone with the right knowledge and skills.

    The project, sumarised, would required for a snippet to output a form to the front end. Something along the lines of say

    <.form.>

    phone:

    postcode:

    [.Submit.]

    <./form.>

    When filled out and submit is clicked this then is passed back to the snippet (backend) and the values from the phone and postcode field are placed within a url query for example,

    http://api.domain.com/checker.do?phone=012345678998&postcode=S819PU&outp
    ut=xml&checks=adsl,adslmax,bulldog,be,easynet,homechoice,wanadoo&options=matc
    h,prereg,adsllinecheck,adslmaxlinecheck&user=XXXX&pass=XXXX

    This url is then sent to the url itself using HTTP POST (due to the amount of characters and security because of the username and password). Once queried the same url outputs a page containing xml which needs to be then placed back in the front end in place of the form but formatted.

    There are a couple of requirements, the first being that I am able to change the url with ease, as each little extra bit either calls for more or less data, for example I wanted to remove prereg, or say if that wasnt there then add it.

    The other requirement would be (and this is because im toying with the idea of an extensive search) that I would be able to add fields which would be included in the url, with ease.

    If anyone out there is capable of producing such a snippet, and as I say this should be easy for the right person, then please do post back or PM me and we can discuss the matter.

    Many thanks,

    Tom.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Huh? Does this mean that you want to display the form input back to the user after he’s submitted the form? Sort of like an order confirmation, or a "print this page for a record of your order" type thing?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 11041
        • 82 Posts
        Yes in a sense.

        The user puts their details in, which is then passed to the url to be queried. Once the url is queried it will return the results on the same page (the url that was queried) but in xml format. Its this xml output that I want to display for the user after they have submitted the details of the form.

        To give you further insight, the query performs a search on the phone number and post code given against a db and reports on the details held, for example, This Phone Line can handle up to 16Mb broadband but not 24mb. Active at your exchange is: BE, Bulldog, Sky, BT.

        Does this make sense?

        So im not displaying the information the user has inputted back to them, but rather more the results that the search on the db has brought up using the details they have supplied.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Ok, that could even be done using AJAX.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 11041
            • 82 Posts
            So would you say this would be a simple and straight forward enough process?

            Bear in mind though that the forms action="" needs to remain hidden due the url containing the username and password for my account on the api.

            Also forgot to ask, would this be a task you would consider at all then ?
              • 11041
              • 82 Posts
              no, one? sad
                • 11041
                • 82 Posts
                :( Oh dear this is looking bad indeed.

                I would have thought there was a team of people who are able to undertake tasks and would offer their services (in one form or another), but it would seem that this is not the case. No offence by the way.

                I just thought I would ask here as a user of modx is familiar with its working as apposed to an outsider spending weeks trying to learn it and then come up with a solution...

                If anyone can/could help, please do let me know. I would be forever grateful.

                Regards,

                Tom.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  If you’re willing to pay for this, you could post a request in the Commercial Inquiries & Bounties forum.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 10449
                    • 956 Posts
                    btw...


                    This url is then sent to the url itself using HTTP POST (due to the amount of characters and security because of the username and password).

                    If you’re seriously concerned about security, use SSL. POST is just as insecure as GET as long as you don’t use https...
                      • 25663 MODX Staff
                      • 12,272 Posts
                      Less than 5 hours of inquiry on a Monday morning for a busy group of developers ... especially when you consider it includes the warning-flag phrases "this is only a small project for someone with the right knowledge and skills" and "with ease".

                      Your requirements in the first post also indicate custom work would be needed for a parsing engine to handle the new tag styles. To me it looks really simple on the surface but fraught with the potential for "but also" requirements once it’s started. And I would guess that the XML requirement is for the phone-exchange query but that’s not clear either... maybe a bit of clarification and description of the overall project would get a few more responses.

                      Good luck! smiley
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me