I'm new to React and I'm building a login and register feature for my website. I want the user to click the login or register button and then the form will popup for user to enter their information. The first thing comes to my mind is using modal in bootstrap but I cannot enter anything in the input fields. Does it the right way to do a popup form in React?
I use react-modal(https://www.npmjs.com/package/react-modal) and redux-form(https://redux-form.com/8.3.0/) for this kind of works
Related
I am writing a mobile app and when the user sees some screens of the app for the first time, I would like to show a tooltip, explaining some of the functionality.
For instance, the user navigates to the profile page, and I show a tooltip on the add icon, saying something like "you can add a photo here".
Obviously I dont want to show this tooltip every time the user navigates to the profile page, so what is the correct way of doing so? Is it via redux? Keeping some state like "tooltipWasShown"?
Or should I write a custom hook? Something which checks if the tooltip was shown? (this should happen again via redux I guess)
I dont think it is a unique problem, but I couldn't find any blog posts/examples of what is the way to implement it. Any suggestions are welcome!
You will need to use Async Storage for the save data about tutorial, if user reload app redux will be empty. Or will add isFirstEnter field to user in DB and then check this field
After a user enters some form values from the mobile app, after clicking submit button, the website should open and the form in it should be prefilled with the values the user entered.
I really don't know how to handle that.
The website was made with react and the app was created with swift.
I am using the material-ui next branch and using the following example as reference for building a dialog.
https://material-ui-next.com/demos/dialogs/
https://codesandbox.io/s/7rq8nl11x
I wanted to know the best way to let the user enter a new contact as per material guidelines ie how to handle the UI for click of add contact button present in the bottom of the dialog. Would it be to hide this dialog and show a new dialog instead which shows a form letting the user enter a new contact.
I'm mostly looking for suggestions on design.
There's a lot of good information on the material design guidelines and best practices for managing components in React.
With that said, a good solution for your situation is to handle all the account management within the one modal. Here's an idea for a structure that's very similar to what Google does:
DialogContainer as the parent component to handle logic and contain the next two components.
AccountList to render each user as well as the 'add account' button.
AccountCreation component that renders the input to add another account.
I have a backbone view call LogOnView. In my LogOnView A user can login using username and password. There exist all type of server and client side validation. I want to use this view in a bootstrap modal when a user click a button in another view. I can add all the content LogOnView into bootstrap modal-body like this
$('.modal-body').html(new LogOnView().el);
N.B. I am enabling the Bootstrap modal dynamically that means from a view (using javascript).
$('#LogOnPopUp').modal('toggle');
By this content of LogOnView is successfully added to Boostrap modal. And also login and validation is ok as it ok in LogOnView. But I need to find a way to do another work when user Login successfully. That means when an user successfully login the modal popup will close and another task will need to done in this view.
So what can I do in this aspect? Any advice will be appreciable.
N.B: (summary/similar criteria )
It's all the same as facebook like. When anyone like a content of other website using facebook account. A user click in like button then a modal popup is opened and after logged in there his like is confirmed.
I want to do something like this using my LogOnView into bootstrap modal.
I'm not sure I understand your question. But if you want to execute an action once some work has been done (i.e. logging on, in your case), you can handle "doing things after" using jQuery Deferreds and promises: http://api.jquery.com/category/deferred-object/
I've written 2 posts on the subject, if this is the route you want to use:
http://davidsulc.com/blog/2013/04/01/using-jquery-promises-to-render-backbone-views-after-fetching-data/
http://davidsulc.com/blog/2013/04/02/rendering-a-view-after-multiple-async-functions-return-using-promises/
Need to show a popup message in home page only for the first time a user logs into salesforce....
its more like a splash page.
it can be a jquery popup as well..
can i do it using a visualforce page ??? if yes, please give ur suggestions
can we do it using the sidebar component in salesforce ???
I thought of showing it using a sidebar component by keeping a custom field in user object...everytime he logs in i will check the custom field and the show the popup...since this popup will be shown only for the first time is there anyother better solution instead of querying the user object evertime..
thanks.
You can use window.open method of Javascript and for the sidebar provide your scroll option.
If you want to get fancy to have customized look you can just use jquery modal with some style on document ready.
We can use cookie to store if this is the first time or salesforce user object can tell you this is the first time