In Wagtail, I currently have content which I wish to update based on API calls to another website:
I have a VideoPage with fields like url, title and description. When adding a VideoPage I'd like to be able to enter just the url , click a button, and it'll try to prepopulate the other fields by making API calls (via either the front end or back end)
I also have a ChannelPage, which VideoPages are children of. I'd ideally like a way to click a button in admin, have my server check whether the channel has new videos, then create new VideoPage children accordingly.
From the above use cases, I believe my problem comes down to this: is it possible to add standalone action buttons to the admin area for a Page which, when clicked, allows the backend to edit fields, create new pages, etc. accordingly?
Related
I have a requirement of pre-filling form on the website. Once the user clicks a button from React Component, he will be redirected to the website and form will be pre-filled for him.
How can I achieve this? Is it even possible?
It depends on how that server is implemented. One page cannot just fill in form fields of a page that it links to. However, if that server accepted request parameters consisting of your username and password, and had some code to use those parameters to set the field values, then you would send that info in the format that server requires.
Without that receiving page directly supporting this use case, you won't be able to do this as you describe.
I have an angularjs app with ASP.NET WebAPI2 REST APIs. There is a scenario where I have a display a popup for initiating a survey for end users (both authenticated and anonymous types). On clicking the popup options, the user will be redirected to another applicaiton which captures all the responses provided by the user.
There is no relation between the angularjs app and the survey application.
Now next time if the user revisits the application then in that case based on the previous action taken to fill the survey , I have to take a decision to display or hide the popup for the user.
I thought of cookies and localStorage as the options but I think are not ideal choices for this scenario.
Can anyone help me to know are there any other possible options to handle this scenario?
You can solve this using the redirection link.
For example if he finished correctly the Survey you will redirect him to:
www.myapp.com/survey/success
Than in the App you can do something like: get the URL parameters, if the parameters is success store it on localStorage so next time he revisits the web-page the Popup wont show.
Otherwise direct him to:
www.myapp.com/survey/
I think the best option here is to save this information in the database using your ASP.NET WebAPI2 REST APIs. In the moment that the end user clicks the survey you can also make an Api call which will save in the database info about user's action(this will probably be sth you can do for authenticated users). For not authenticated users you can just save that information in localStorage in the moment they are clicking the survey.
I tried google to search the answer but may be I am not asking the correct question.
My Scneario is, I have an angular app(APP1) with a grid. The grid has a link in one of its cell which points to an external asp.net web application(APP2). When the user clicks on the link he/she will be navigated to APP2, where they will perform some actions. Once done the user will click a button on APP2 which will save the data and generate an ID and Navigate back to APP1(angular app).I need to get hold of this id that is returned from APP2 and do some operations in APP1.
Let me know if its not clear what I am trying to do.
App1(angular)->App2/someparameter(asp.net webform app)->App1/id(angular)
How can I achieve this?
In my application I have a page that display several tabs. All the informations are gathered with a single HTTP request. Every tab contains an HTML form. By default on the load of the page we load the first tab. After a modification within any tab we reload the page for informations refresh (following en INSERT/UPDATE in a backend database). What we want: if before any update we were on a particular tab (any other than the first one), to return on the same tab.
I thought at several solutions:
To use different URL for different tabs (panes), namely URL routing. For example, domain.ext/page/tab. There, I have a problem because the URL must update following user trace. If the user click on a 3rd tab, we have to change the URL to domain.ext/page/3rd-tab using $location.path() which triggers page reloading.
To use the same URL (what we have now) and anchors in the page managed by $location.search() and reloadOnSearch = false. For example, domain.ext/page?pane=tab. There, I have another problem because the query string (that is managed by $location.search()) is kept at service level and when the user goes on another page, the query string is the same (domain.ext/another-page?pane=tab). I would like to delete the query string when the user leaves the page.
To use ui-route. This solution change lot of the actual structure of the application.
IMHO the 2nd solution seems better except that I don’t know where and when to reset query string.
I’d like your opinions on this topic.
Thanks.
I need to have a custom widget on Salesforce Service Cloud Console. I don't really care where it is as long as it's easily accessible (kind of like the Softphone widget).
I need this for two reasons:
I need a quick way for users to change their "status" (a custom field on user).
I need to execute some custom javascript to hide certain elements from some page layouts.
Any idea if this can be done?
Note: when I say "Service Cloud Console" I mean this kind of console:
I think Custom Console Components may be what you are looking for? (Here is how to add them to the console once you made them. Note that after the 11 steps, it says 'Before you can access ...'.)
I have implemented similar thing using a custom console component , there you can add a visual-force page and add a button on it "Change Status". Once user clicks it get who is the logged in user .
String userid = UserInfo.getUserId()
rest is the simple logic to change the status on User record on the page controller.