Customer Portal

Get Involved. Join the Conversation.

Comments

  • Skawn

    What a week!

     

    Finally had time to have a go at this today.

     

    It's looking great, thanks for the help.

     

     

     

    EDIT: Just in case anyone else finds this thread and finds it useful, the final step needed was to change login_required="true" to false in the meta tags at the top of ask_confirm.php as we did at the start for ask.php

  • monique perkins

    Since you want it to look different in places your best option is to copy the widget view.php file(s) into a new widget(s).  If you leave the standard controller and logic in the meta tag then they should have the same functionality.

     

    Rename the css classes and create css / html that does what you want. You should be able to use css to replace the image in the button too. 

  • Ernie Turner

    I've just learned that the code example I've given doesn't work very well in IE because of the <form> within a <form> tag. Here is new code that should work.

  • david fulton

    Hey Shiloh - interesting use case. It shouldn't be a major issue to deal with through a custom widget - it just sounds like instead of one hidden div containing the feedback form, you probably need two of them - as long as they essentially submit the same kind of data, it sounds like most of the work is in changing the view and some work changing the logic to support the additional events - the only change I can think of to your model is probably to support that incident custom field addition.

     

    Have a look at the out of the hidden divs (you'll also want to look at the out of the box CSS for that object as it may control the placement and visibility of the form object) and work from there.

  • Skawn

    That looks close enough to me - I'll give it a try on Monday when I'm back in the office.

  • Ernie Turner

    Attaching file "display.png" (23KB)

  • Ernie Turner

    There is a way to do something similar to what you are hoping to accomplish, but it won't be exactly like the way it works on your 7.5 site. The key here, is to make the Ask a Question page contain both incident and contact fields on the same form. That way, a user can both create an account and ask a question on the same form. I'll go through a step by step conversion process.

     

    1. Remove the login_required="true" meta tag from the ask.php page. This will allow non-logged in users to access the page.

       

    2. On the ask.php page, add a section that allows users to either log in, or create a new account, and only show this section if the user is not logged in. For example, the code I added is in the first image below (added code in white). This code will give users who have an account the ability to log in (which will refresh the  page), and users who do not have an account to create a new one with login, name, and email.

     

    I've done a screenshot below of what the new page should look like on your site.

     

    3. Optionally, you might also want the user to fill out additional contact information other than just what is on this form after their account/incident is created. In that case you can change the 'on_success_url' attribute of the FormButton widget to point to "/app/account/profile". When you do this though, you probably only want to redirect them there if they are just creating an account, so you can do that by something like this:

     

    <?if(isLoggedIn()):?>
        <rn:widget path="standard/forms/FormButton" label="#rn:msg:CONTINUE_ELLIPSIS_CMD#" on_success_url="/app/ask_confirm" />

    <?else:?>
        <rn:widget path="standard/forms/FormButton" label="#rn:msg:CONTINUE_ELLIPSIS_CMD#" on_success_url="/app/account/profile" />
    <?endif;?> 

     

    That should mostly accomplish what you want I think. Let me know if you have any other questions on this conversion.

     

    Note: The example I've mocked up here was done on the August '08 version of Customer Portal.

     

     

  • monique perkins

    absolutly

     

    It's easiest to keep the same name.  The preceeding steps are if you want to change the name of the page entirely.  There is always a backup copy in views/default/pages if you need it.

  • Shiloh Madsen
    Ok, that makes sense. I will do that and get back to you. Alternatively, could I just backup detail.php and then make changes directly to it?
  • monique perkins

    There are a few places you will want to change in order to use a completely new page.

     

    1 - There is a config CP_ANSWERS_DETAIL that lets you specify your primary detail page.  This is used to provide links in incidents, as well as create the link in the report.  If you change it to your new page you should get the new links - 

    CAUTION: - if you are on a live site this will change the production version as well

     

    2 - If you want to change just the report link you can go into the analytics console, copy the CP answers report, and change the url. (Right click on the column -> format -> ur)

     

    3 - You will aslo want ot copy the answersSearchArea widget and change the reportId and report_page to the new items. 

     

     

  • Ernie Turner
    There is a config setting named CP_ANSWERS_DETAIL_URL that is used to determine the name/url of the answers detail page, relative to the leading /app/. You can change this config to be the URL of your new answers detail page and all links should then go there.
  • Ernie Turner

    With our current setup, there is no clean way to do this (the ideal way to do this would be to,  as you suggested, automatically copy the username value to the email field). We are going to add the ability to do this in the near future by allowing you to modify the contact record before it gets submitted.

     

    For the time being your solution might have to suffice. Another option here would be to create your own customized Input widget that you only use with the the email field. You would hide the input field in the same way you are now. Then in the onValidate() function, get the value of the 'login' field and set it as the value of the hidden 'email' field. This would accomplish the same goal. If you went this route, it might also be a good idea to remove a bunch of the field specific javascript functions in your custom Input widget logic.js file in order to increase performance.

     

    Also, it might be better to hide the login field instead of the email field. This way, the email address field will get validated in the same way it always does. If you show them the login box, there wouldn't be a requirement for them to enter a valid email address.

     

     

  • HT

    Thanks Hazman, sharing this with us. Looks great!

     

  • Hazman Aziz

     Hi Danny,

     

    I have implemented out the knowledge syndication widget for my university library. You can check out on this url: https://venus.wis.ntu.edu.sg/lib_databases/ask.html

     

    This a directory (- a gateway page) for all library subscribed databases to access. All the university community will enter thru this page and do their research for more academic resources.

     

    Lot's of questions and FAQ are related on this page. I have cite out using RNT database just extract all the FAQ Knowledge based that related to this service point. For Library science, this is a new initiative (I guess), mashing up a directory content mgt system, a proxy server and a knowledge based. Soon, I will putting in some social attribute to make this a social site, where learning and doing academic work will be fun. 

     

    check out.

     

    Regards,

    Hazman Aziz

    http://hazmanaziz.com

  • david fulton

    Ok - it appears that this sort of issue may come up if you refer to your own custom page (or an out of the box page) and don't start off your relative URL with a forward slash.

     

    so, the searchButton attribute report_page, if set to report_page="app/answers/list" - will mangle the URL to <site>/comapp/answers/list. Always ensure that that forward slash is the first part of the relative URL.