I'm using PromptDialog.Choice to show options to user. The problem is :
I've 4 options but only 3 of them are showed. If user wants to see the last option, must use scroll. My bot is configured for messenger channel.
I've this :
var dialog = new PromptDialog.PromptChoice<string>(options, "I can assist you with : ", "Sorry, that wans't a valid option", 2);
context.Call(dialog, UserChose);
How to override PromptStyler to get this done ?
I want to show all the options to user when prompt is created without scroll.
Is that possible ?
EDIT after Ezequiel's comment:
If you use PromptStyle.Keyboard, you will automatically get a correct display as the QuickReply style is now supported by the framework:
Initial answer:
If you are only using Facebook Messenger channel, you may use Ezequiel Jadib's Quick Replies implementation: https://github.com/ejadib/QuickReplies
It uses Facebook's ChannelData to set up real quick replies that Facebook Messenger displays in a good look-and-feel: https://developers.facebook.com/docs/messenger-platform/send-api-reference/quick-replies
Samples:
You can read more info on this blog post: http://southworks.com/blog/2016/09/15/sending-facebooks-quick-replies-using-microsoft-bot-framework/
Related
Quick question.
When it comes to Xamarin Forms, I noticed that if there is an alert called from the ViewModel
e.g:
DisplayAlertAsync("Title","Message", "Ok");
That the voice assistant only auto reads the first parameter of DisplayAlertAsync ("title") and does not auto-advance to the following parameters.
So, a temporary solution I did was concatenate the 1st and 2nd parameters into the 2nd parameter, so that VoiceReader auto reads both the title and message for accessibility users.
e.g:
DisplayAlertAsync("" ,"Title"+ "\n"+ Message", "Ok");
Is there a way to keep the traditional DisplayAlertAsync("Title","Message", "Ok"); parameter assignment, and have VoiceReader auto advance to the following parameters?
What you are looking at is expected behavior. Since Xamarin Forms uses Native APIs, so the alert dialog in the native platforms also does the same thing- Whenever you open a new page/alert, it should read the Title of that view.
For the most part, what you want to keep an eye out for is images & icons, you have to override the description of those items.
Q. Is there a way to keep the traditional DisplayAlertAsync("Title","Message", "Ok"); parameter assignment, and have VoiceOver/TalkBack auto advance to the following parameters?
A. No there isn't, you would have to create your own custom renderer if you want the reader to read everything.
Multiple questions about Bot Framework V4.
Change the input field place holder text
Change the status message
Auto scroll on new message
On new message, chat bot is not scrolling down.
This issue is already asked here - 'Auto scroll' not working On Microsoft-bot-Framework (Python SDK based)
https://github.com/Microsoft/BotFramework-WebChat/issues/1031#issuecomment-459397736
Tried the workaround solution for web chat, but with adaptive cards taking some time to load, this solution doesn't scroll down fully.
Added a timeout of 3 sec, it works, but not ideal solution as there is a lag in scroll.
My Adaptive cards json is added to https://www.qnamaker.ai/, is that the reason for delay in loading?
You can change the sendBox default text by accessing the property via store, like so:
const store = window.WebChat.createStore( {}, ( { dispatch } ) => next => async action => {
store.dispatch({
type: 'WEB_CHAT/SET_SEND_BOX',
payload: { text: 'You got this!'}
});
});
The ability to customize the timestamp is, at this time, still a feature request. If this feature would be valuable to you, I would suggest you upvote and/or add your voice to the conversation.
My strong suspicion is, yes, the lag on rendering the adaptive card is due to QnAMaker. Or, more specifically, due to an API call and needing to wait for the returned result.
I'd like my bot to take the user through the process of booking an appointment. I want almost exactly the flow show on the home page of the https://dev.botframework.com/
However I cannot seem to find the right attachment types to represent the list of buttons or the follow up details with the 'Book now' button. Can anyone tell me which types of attachment/card these are?
List of buttons:
It doesn't look like FB Messenger. On Telegram, a HeroCard without an image would look this way (separate messages). Otherwise a SigninCard may do.
Bottom card:
ThumbnailCard card = new ThumbnailCard() {
//...
};
activity.Attachments = new List<Attachment>() {
ThumbnailCard.ToAttachment()
};
Is there a way to REQUIRE a PayPal dropdown to be answered? Currently, my choices are 1. Select One, 2. Satchel Brown, and 3. Midnight Black. If I skip it, it accepts "Select One" as the option. What to do? Leave the first option blank? I don't want to use a default answer.
Are you using a custom button (code generated using a form) or a paypal supported button that you generated the code for in paypal?
If you are using a paypal custom created button, create a confirmation page and have it post the users choice to there. Then, using php, check to see that the users choice is one of the valid options. If it is not, then simply use the header('Location: http://www.MyWebsiteHere.com/Wherever.php?&error=Unselected') to send them back to the page and add a error message so if(isset($_GET['error'])), then echo $correspondingErrorMessage. Very simple thing if you do it like this.
I am trying to disable a field, i.e. grey it out and not allow the user to select it. To achieve this effect I am currently calling
crmForm.all.new_attribute1.disabled = true;
crmForm.all.new_attribute2.Disabled = true;
The Disable, with a capital D, makes the field grayed out but the user can still put the cursor in that field or tab to it.
The disable, with a little d, makes the field unavailable to the cursor and via tab, but gives no visual indication that it can't be interacted with.
Is there a better way to do this, one call that will achieve similar results or am I stuck having both there?
Using "Disabled" property should work.
You can try putting this code in OnLoad event of Account entity (don't forget to enable Event and Publich entity!):
crmForm.all.accountnumber.Disabled = true;
And "Account Number" will be blocked and greyed as seen in this picture:
(source: vidmar.net)
You are talking about readOnly and disabled.
A great article was posted http://customerfx.com/pages/crmdeveloper/2006/03/06/readonly-and-disabled-fields.aspx ... maybe this could help.