javascript - SharePoint Online Form Processing -


i wrote simple html/php form takes input form , outputs html create company standard email signature. echoes strings form fields html signature.

form:

<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 following 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> 

it works great, tell me want put on our company's sharepoint online site.

as far can tell, there no way run php on sharepoint. can't use pageviewer web part.

what best option doing through sharepoint? client side run inside of sharepoint? think java script option, don't know it. know sharepoint uses asp, know less that.

any appreciated!

php server-side code, cannot add in sharepoint online unless you're willing write own sharepoint apps.

for this, best bet page 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 following 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>


Comments