9 Replies Latest reply: Oct 29, 2014 7:37 AM by RolandeDeschaine RSS

    Webform Redirect

    JohnSSmith Community Member

      I just cant use the webform results as they are, so am I able to redirect to a page I build?

       

      It would be nice to be able to be able to drag out some of the information and display it, but I am thinking that is not possible.

       

      I found this thread Webform confirmation page - EID and CID API question

       

      However I have no idea where they placed that redirect  - anyone know where it can be placed in the form?

       

      Thank you

        • 1. Re: Webform Redirect
          RolandeDeschaine Community Member

          Are you wanting the data that is submitted to post on your redirected page or do you just want a custom landing page for them to land on outside of BC?

          • 2. Re: Webform Redirect
            JohnSSmith Community Member

            If I could format the data, then yes I would want it, but if not, then no, because all I end up with is the same unprofessional look as the current webformresults.

             

            Although it would be nice to know how to get the data, if you know how to do it.?

             

            As it is, I have figured out where the place the redirect.

             

            Thank you.

            • 3. Re: Webform Redirect
              RolandeDeschaine Community Member

              It is possible to change the look and feel of the web form results. I stripped the BC classes out and then created a "holding" class for the form and styled all the elements within that holding class to appear as I want them to.

               

              The Forms, Results and Confirmation page all now seamlessly blend in to my site design. I then went in and did the same thing for all system emails stripping all of BC's real ugly style-less look out of it.

               

              You'll find these in the System Messages and System Emails section (or you can do all your work in DreamWeaver as I do it's just a bit less obvious to drill down to those items in DW)

              • 4. Re: Webform Redirect
                JohnSSmith Community Member

                I should have thought of that myself - nice!

                 

                I am assuming then, for the form, you left the html table in, because you can't remove that from the "results", and then you styled around the table. Using the holding class in the system message, instead of class="system-message"

                Basically giving you the exact same format as the form.

                 

                It does mean every result is the same as the form, so you can't style individual results, and its a bit cumbersome for created fields. For example I have a form of 92 different inputs, and I did instyle CSS as they were nearly all different.

                 

                That's fantastic - thank you very much.

                • 5. Re: Webform Redirect
                  RolandeDeschaine Community Member

                  I actually hand modify the form side so there is no table format for my forms pages and for the form confirmation I have an on page <style> section right above the body tag that overrides the class="tabledefault" (written by the BC module) to use the same styles I have for my Bootstrap based site.

                   

                  It's a bit of creative style hacking but it works and it keeps my site clean, simple and no redirects.

                  • 6. Re: Webform Redirect
                    JohnSSmith Community Member

                    You lost me - I am no coding expert.

                     

                    I did hand modify the form side to rid myself of the table format, but don't understand how you were able to rid yourself of the table format in the results.

                     

                    I can see in the source file of the results page, the table: <table class="tabledefault" but how do you overwrite that so tables are not used?

                    • 7. Re: Webform Redirect
                      RolandeDeschaine Community Member

                      No problem.

                       

                      I'm actually not getting rid of the table on the results page as it isn't possible to edit the module they've used to write the results. You can however add a style tag above the body tag (or at the lowest point of the head tag to completely undo their tabledefault class and impose your own version of the tabledefault class to give you the look you're shooting for. You do this by adding it to the System Pages form results module/template.

                       

                      it will look something like this:

                       

                      <style>

                      .tabledefault{

                      add your own style here;

                      }

                      </style>

                      <body>

                      The rest of your page here.

                       

                      Since the style declaration is read after the BC stylesheet it is imposed on the table. What I did was make sure that their tabledefault class matched the normal table class I have for my site giving me consistency.

                      • 8. Re: Webform Redirect
                        JohnSSmith Community Member

                        Ahh thanks - It thought there may be some way to get rid of the table, and thought you had achieved that.

                         

                        I ended up doing this

                         

                        /* ===== Web Form Results ==================== */

                         

                        /* adds padding between the title and data entered*/

                         

                        .tabledefault strong {

                            padding-right: 15px;

                        }

                         

                         

                        /* Hides fields I did not want to see */

                         

                        .tabledefault #casenumber,

                        .tabledefault #anniversary1title,

                        .tabledefault #anniversary1 {

                            display: none;

                        }

                         

                        /* makes the wording or title  Summary of web form submission:'  hidden - you cant use display:none as the the whole thing would be gone */

                        .tabledefault #title strong {

                            visibility: hidden;

                           

                        }

                         

                        /* Adds my own text instead of  'Summary of web form submission:'  */

                        .tabledefault #title strong {

                        .tabledefault #title:before {

                            visibility: visible;

                            content: "Summary";

                        }

                         

                        /* makes my own text bold  */

                        .tabledefault #title strong {

                        .tabledefault #title {

                                font-weight: bold;

                        }

                         


                        I now have a webformresult that looks better.

                         

                        Thanks for putting me on the right path.

                        • 9. Re: Webform Redirect
                          RolandeDeschaine Community Member

                          No problem. That's pretty much what I did including stripping out the funky grey background color but I really like what you did with the #title to control the text. I may revisit mine and steal that little bit of clean up to the title.