簡體   English   中英

SharePoint Online表單處理

[英]SharePoint Online Form Processing

我編寫了一個簡單的HTML / PHP表單,該表單從表單輸入並輸出到HTML以創建公司標准的電子郵件簽名。 它只是將表單字段中的字符串回顯到HTML中進行簽名。

形成:

<form action="sig.php" method="post">
Full Name: <input type="text" name="fullName"><br>
Job Title: <input type="text" name="jobTitle"><br>
Direct Phone Number (xxx.xxx.xxxx) <input type="text" name="phoneNumber"><br>
Email: <input type="text" name="email"><br>
<input type="submit">
</form>

PHP:

<div style="font-size:10pt; font-family:'Arial',sans-serif;color:#0E5881">
Please copy/paste the following into your email signature:
</div>
<hr>
<br>
<br>
<div style="font-size:12pt; font-family:'Arial',sans-serif;color:#133467">
<b><?php echo $_POST["fullName"]; ?></b>
</div>
<div style="font-size:10pt; font-family:'Arial',sans-serif;color:#0E5881">
<?php echo $_POST["jobTitle"]; ?>
</div>
<div style="font-size:10pt; font-family:'Arial',sans-serif;color:#656565">
Direct:</b>&nbsp;<?php echo $_POST["phoneNumber"]; ?>
<br>
<a href="mailto:<?php echo $_POST["email"]; ?>"><?php echo $_POST["email"]; ?></a>&nbsp;&#124;&nbsp;<a href="http://www.example.com">www.Example.com</a>
</div>
<br>
<div style="font-size:20pt; font-family:'Arial',sans-serif;color:#676767">
<b>Example.com</b>

效果很好,但現在他們告訴我他們想將其放在我們公司的SharePoint Online網站上。

據我所知,無法在SharePoint上運行PHP。 我也不能使用PageViewer Web部件。

通過SharePoint執行此操作的最佳選擇是什么? 某些客戶端可以在SharePoint內部運行? 我認為Java腳本是一種選擇,但我對此一無所知。 我知道SharePoint使用ASP,但對此我所知甚少。

任何幫助,將不勝感激!

PHP是服務器端代碼,除非願意編寫自己的SharePoint應用程序,否則無法在線添加到SharePoint中。

對於這樣的事情,最好的選擇可能只是帶有一些JavaScript的頁面。

 document.getElementById("btnSubmit").addEventListener("click", function() { document.getElementById("signaturePanel").style.display = "inherit"; document.getElementById("fullNameOut").innerHTML = document.getElementById("fullName").value; document.getElementById("jobTitleOut").innerHTML = document.getElementById("jobTitle").value; document.getElementById("phoneNumberOut").innerHTML = document.getElementById("phoneNumber").value; var email = document.getElementById("email").value; var emailOut = document.getElementById("emailOut"); emailOut.innerHTML = email; emailOut.href = "mailto:" + email; document.getElementById("socialOut").style.display = document.getElementById("social").checked ? "inherit" : "none"; }); 
 Full Name: <input type="text" id="fullName" /> <br>Job Title: <input type="text" id="jobTitle" /> <br>Direct Phone Number (xxx.xxx.xxxx) <input type="text" id="phoneNumber" /> <br>Email: <input type="text" id="email" /> <br> <input type="checkbox" id="social" checked="checked" />Include social media links <br/> <input type="button" id="btnSubmit" value="submit" /> <div id="signaturePanel" style="display:none"> <div style="font-size:10pt; font-family:'Arial',sans-serif;color:#0E5881;"> Please copy/paste the following into your email signature: </div> <hr> <br> <br> <div style="font-size:12pt; font-family:'Arial',sans-serif;color:#133467"> <b><span id="fullNameOut"></span></b> </div> <div style="font-size:10pt; font-family:'Arial',sans-serif;color:#0E5881"> <span id="jobTitleOut"></span> </div> <div style="font-size:10pt; font-family:'Arial',sans-serif;color:#656565"> Direct:</b>&nbsp;<span id="phoneNumberOut"></span> <br> <a id="emailOut" href="mailto:"></a>&nbsp;&#124;&nbsp;<a href="http://www.example.com">www.Example.com</a> </div> <br> <div style="font-size:20pt; font-family:'Arial',sans-serif;color:#676767"> <b>Example.com</b> <div id="socialOut" style="display:none"> <a href="http://example.com"> <img src="https://placeholdit.imgix.net/~text?txtsize=15&txt=twitter+link&w=90&h=90&txttrack=0" /> </a> </div> </div> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM