How can I have a check box control form submit properties? - forms

I'm putting together a pretty basic InfoPath 2010 form that will be filled out in a browser (by non-logged in users) and will generate an email upon submission. The client that I building the site for would like a user to be able to check a box to mark whether they would like to have the email address that they provided be CC'd on the form submission.
I know how to CC the email upon submission, but I haven't found anything that talks about using a check box to control it. I have tried playing around with rules and submit button options, but couldn't get exactly what I wanted to stick.
What I need is: if a user checks a box, they will get CC'd upon submission, and if they leave the check box unchecked, then they receive no email.

Use the code behind of the InfoPath form to accomplish this. Get the XPath of the field associated with the checkbox in the Form_Submit method of the code behind. If the field returns true, go ahead and CC, otherwise, don't CC.

Related

Using spfx webparts, would there be a way to either programmatically send an email which has a link to open a modal or using flow?

I want an spfx made webpart that I've made be able to send an email (I'm using IEmailProperties at the moment) which provides a link to a modal form?
For example:
User clicks button in webpart, form loads.
User fills out form and submits it to SP list.
Form sends email on submission. Email has a link to the actual item created, so when the user clicks the provided email link, it opens up the modal form.
I would presume that the user would HAVE to be sent to the SP page where the webpart is unconditionally, but would it be possible to open up the modal corresponding to the SP list item?
Is this feature available in SharePoint framework, because if it isn't, compared to something like InfoPath 2013 or PowerApps it's quite a limitation.
I've researched this with several shallow Google searches and on gitHub for any premade stuff, but alas there is nothing that I've spotted.
I've been told IT IS possible:
"Yeah, they’d have to visit the page. Email clients don’t do JavaScript so you can’t really do interactive stuff there. If you want to take them directly to a page that then displays a modal, that’s plenty possible though. (e.g. display the modal based on if the URL contains a certain string)"
But wouldn't know how to do the above, can anyone start me on the right path?
Regards,
T
In the email, pass a query string containing the item ID/list ID etc of the item, then have the webpart read the See: How can I get query string values in JavaScript? If your values exist. If they do exist, then open the modal using some kind of framework like bootstrap or fluent UI. You can write your own form using PnPjs or use an iframe potentially to display the OOTB edit form.
Additionally, you can link to any page in SharePoint provided you use an extension instead of a webpart to host the modal. You can install extensions tenant wide, and have it listen for the query string.

Form submit fails in Gmail, Yahoo, Hotmail

I am in receipt of an forwarded email that has a form to be filled & submitted for a course/event registration. The form has a studentId, emailId, mobileNo, password, Confirm password fields & a submit button.
On Gmail, I fill in details & submit, nothing happens.
In yahoo, as I type the password (after typing other fields), I get a popup that says that the form is not being submitted to yahoo & yahoo never asks password. I do a OK on the popup & submit the form, nothing happens
In hotmail, as I try to type in characters in any of the above fields the cursor disappears, so nothing to submit.
A 'view source' of the page does not show a 'form' element that I was expecting. When I do a inspect element I am able to see the static labels against each of the fields above though no form element. See a lot of tr, td wrapped in table/tbody.
I have tried reading various forums, they seem to mention that having such forms in html emails is a bad idea & better option is to provide a link. None of them say that it will not work on gmail or yahoo.
This mails with the form has been sent to many people & some of them at least have been able to submit. I am just unable to figure out the reason for the failure of the submit. I have tried IE, Mozilla & Chrome.
Any views on what the solution to the problem would be very helpful.
On some newer email readers the form tag is stripped out because of security issues. It's better to have the form on the Internet and a link to it from the email document.

Ektron Form including extra fields in Post email (Ektron 9)

I'm using an Ektron HTML Form on one of my pages for registration for an event. The Form sends an email to my client with all of the information that the user put in. However, the email includes extra fields with data that the client does not need, and they find it confusing. In addition to all the fields that the user filled out, they're also getting fields such as "cx", "cof", "EktFormId", etc. The client finds this confusing and doesn't want the extra fields, they only want to be sent the info that was filled in (or left blank) by the user.
This is a screenshot of the email that is being sent upon form submission. We want to prevent everything before "FirstName" from being sent. Does anyone know how to do this?
The best way will involve a bit more legwork on your part. If you have the HTML form post to an Action Page, then your Action Page can use Request.Form to pull in the fields you want and then send your own email.
See the documentation and look for section "Redirecting Form Data to an Action Page"

How do I set the Google Form to automatically send to another user in HTML format other than respondent?

How do I set the form to automatically send to another user in HTML so it looks like the one the user gets when the user checks the "Send me a copy of my responses" box? I can't figure out how to set a script and/or trigger to send the HTML form to a user other than the respondent.
You can do this with google apps scripting, in particular the function MailApp.sendEmail. For HTML messages be sure to make use of the advanced parameters like htmlBody.
Check out the MailApp class for full details:
https://developers.google.com/apps-script/reference/mail/mail-app

Zend Framework: How to POST data to some external page (e.g. external payment gate) without using form?

I would like to have a user redirected to an external credit card gate. Of course I have to POST some user info to that gate, but I don't know how exactly can I do this.
I know that I could do this by generating a html form with hidden or read-only fields and have a user click "Submit" button. But this solution is not perfect, because all the form data could be easily changed using e.g. Firebug. I think you cannot do this using $this->_redirect(...). But maybe there is some other solution?
Many thanks for any tips or suggestions.
I would like to have a user redirected to an external credit card gate. Of course I have to POST some user info to that gate, but I don't know how exactly can I do this.
Using a form is the only method available. The RFC states that the user should explicitly agree to sending a POST (i.e. click on a submit button).
I know that I could do this by generating a html form with hidden or read-only fields and have a user click "Submit" button. But this solution is not perfect, because all the form data could be easily changed using e.g.
It is no more secure that using a redirect as the header data can be modified without too much of a problem. There are even Firefox plugins to do it.
use cURL to post data
http://framework.zend.com/manual/en/zend.http.client.adapters.html