Extra Buttons on SharePoint 2013 NewForm.aspx - sharepoint

I have a site, when the user completes viewing items on the site, they click a complete button (that was hidden until they completed the required tasks) that pops up a NewForm for the attendance list. Once the user adds their name and clicks save, the NewForm should close. I created a NewForm (NewForm_CloseAfter.aspx) and pointed the site to open the NewForm_CloseAfter.aspx (no problems so far).
See code below. I commented out the SharePoint button and added the html input button.
The problem: My html input button at the bottom of the form works fine. However, looks like the default save/cancel button is at the top with the default behavior of submitting the information and showing the list (unwanted behavior)
The Question: How can I remove the default buttons at the top of my form?
Thanks
<tr>
<td class="ms-toolbar" nowrap="nowrap">
<table>
<tr>
<td width="99%" class="ms-toolbar" nowrap="nowrap"><IMG SRC="/_layouts/15/images/blank.gif" width="1" height="18"/></td>
<td class="ms-toolbar" nowrap="nowrap">
<!--<SharePoint:SaveButton runat="server" ControlMode="New" id="savebutton2"/>-->
<input name="Submit1" type="submit" value="Save" id="savebutton2" style="width:75px" onclick="javascript: {ddwrt:GenFireServerEvent('__commit')}; window.alert('Item updated.') ; window.close();" />
</td>
<td class="ms-separator"> </td>
<td class="ms-toolbar" nowrap="nowrap" align="right">
<SharePoint:GoBackButton runat="server" ControlMode="New" id="gobackbutton2"/>
</td>
</tr>
</table>
</td>
</tr>

Edit the your custom new form in designer and search for "savebutton1". Find the surrounding tr and comment out it and you are done.

Related

Apache Zeppelin : How to publish whole report to website

After connecting to the PostgreSql Database and retrieving specific data, some (5) visualisations were made. Instead of publishing each paragraph (Each individual visualisation) to a website, is there a way of publishing the whole report (obtained while viewing the notebook in report view)?
Well, that is quite useful feature. I would welcome something like that.
I was thinking about exactly same thing. I needed to publish 4 simple visualizations at once. After some attempts I found way how to solve this.
As a first step I just created one last paragraph on the end of my notebook which had interpreter displaying HTML. I used pyspark by:
print("""%html ... """)
Then I created simple HTML table layout like this:
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 50%;"> </td>
<td style="width: 50%;"> </td>
</tr>
<tr>
<td style="width: 50%;"> </td>
<td style="width: 50%;"> </td>
</tr>
</tbody>
</table>
(I am not HTML professional, so I just used HTML generator for this).
After layout was generated, I populated all cells with each paragraph iframe link I needed to display. As example, one cell of table looks like this:
<td style="width: 50%;"><iframe src=LINK_WHICH_YOU_GET_BY_PUBLISHING_PARAGRAPH width="100%" height="400"></iframe></td>
There is more parameters how you can play/tune within that HTML table and with iframes, but it require some HTML skills.
When all cells of the HTML table are populated just try to run the HTML in that very last paragraph of your notebook. If outcome is OK then just publish this lash paragraph and you have one link to your all visualizations.

Material Design Lite Lists - how to access selected elements?

I'm using Aurelia framework with Material Design Lite via plugin "aurelia-mdl-plugin".
I have the following markup:
<table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp">
<thead>
<tr>
<th class="mdl-data-table__cell--non-numeric">Name</th>
<th>Col2</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr repeat.for="s of items">
<td class="mdl-data-table__cell--non-numeric">${s.name}</td>
<td>${s.someothercol}</td>
<td>View</td>
</tr>
</tbody>
</table>
This markup represents a list of items that are selectable - each of them gets a checkbox with ability to select + the list gets "select all" check box in the header.
The problem is that since this additional markup with checkboxes is generated by MDL I can't really bind to it.
If I had a checkbox manually inserted I would do something like:
<input type="checkbox" checked.bind="s.IsChecked" />
Is there any way to fix this?
PS> I don't think it's necessarily Aurelia specific. Most likely I would have the same problem in Angular or other library..
The mdl team officially deprecated automatic checkbox insertion. So now you should write them down manually, which would solve your binding issue.
See this link: https://github.com/google/material-design-lite/wiki/Deprecations#automatic-selection-checkboxes

qListView custom display & Lync presence indicator issue

I've got a basic list of users with some roles & features and am using qlist to display them how I want on the main page. The only problem is that I cannot get the Lync presence indicator to work with a Custom Display.
If I just use the default Sharepoint List View or the Quest 'Display Fields' one without custom display, it's fine but I cannot get the presence indicator to work using custom. I'm really hoping that I'm missing something super simple...
The normal Display Field looks like this (tickbox for 'Enable Presence' checked) and the Lync indicator is there:
<Fields LookupThresholdControlSetting="Default">
<Field Name="Name" Presence="true" GroupExpanded="false" />
<Field Name="Responsible for..." />
</Fields>
The bit of my custom display that's not working so well is here (pulling some other fields too but they're fine). The Lync indicator doesn't appear:
<td valign="top" style="font-size:14px; padding:2px;">
<%Name%><br>
<%Job Title%><br>
<%Telephone Number%><br>
<%Responsible for...%>
</a> </td>
I have a workaround that displays the indicator (non-custom display) but I don't like it so would like to have my custom one.
Can anyone tell me if adding the equivalent of Presence="true" is possible with a Custom Display? The name field is pulling AD details with Lync presence.
update
I have come a little further with this and now have a Lync icon appearing with the correct details etc...but it's showing everyone as offline (unless hovered over in which case it's fine..)
<td valign="top" style="font-size:14px; padding:2px;">
<img src="/_layouts/images/imnhdr.gif" onload="IMNRC('<%EMail%>')" id="<%ID%>" name="imnmark<%ID%>" ShowofflinePawn = "1" border="0" height="12" valign="middle" /><%Name%><br>
<%Job Title%><br>
<%Telephone Number%><br>
<%Responsible for...%>
</a>
</td>
FIXED
FIXED - Dell Forums came through with a solution.
<td valign="top" style="font-size:14px; padding:2px;">
<span><img src="/_layouts/images/imnhdr.gif" onload="IMNRC('<%EMail%>')" id="QAIMID<%ID%>" name="imnmark<%ID%>" ShowofflinePawn = "1" border="0" height="12" valign="middle" /><%Name%></span>
<br>
<%Job Title%><br>
<%Telephone Number%><br>
<%Responsible for...%>
</a>
</td>
</tr>
</table>

sharepoint designer 2007- Redirect to another Page after adding List Item

I am using SP Designer 2007 to display the custom list form. Users will use this form to fill in the details and click on submit. Once they submit, they will be stored in the list.
But it redirect to Allitems.aspx of the list rather then confirmation page.
How do I redirect to custom page.
When clicking on the cancel button I need to redirect to the default.aspx page.
This is what my code looks in SP designer 2007.
Where do I specify the redirect attribute in the below code?
<table>
<tr>
<td width="99%" class="ms-toolbar" nowrap=""><IMG SRC="/_layouts/images/blank.gif" width="1" height="18"/></td>
<td class="ms-toolbar" nowrap="">
<SharePoint:SaveButton runat="server" ControlMode="New" Text="Submit" id="savebutton2" source=""/>
</td>
<td class="ms-separator"> </td>
<td class="ms-toolbar" nowrap="" align="right">
<SharePoint:GoBackButton runat="server" ControlMode="New" id="gobackbutton2"/>
</td>
</tr>
</table>
Thank you
On the onclick event of your submit button add something like this:
javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={submitted.aspx};')}

How to retrieve attachment file name in display form of custom list form with SharePoint Designer

I have created custom list and modified display form of list for display attached image of list.
I have place HTML image control on display form but I can’t get attachment URL path which I can assign to Image control. I tried to some level hardcode like:
“http://Server Name/SiteName/Lists/ListName/Attachments/{#ID}/???”
I can get ID value so it can be work but the last thing file name, I am not able to get the attached file name.
Do I need to write code to get path? If yes then which event I have to inherited
This solution requires undocumented magic.
...puts robe and wizard hat
Inside your table with the #Title and such:
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Attachments</nobr>
</H3>
</td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="attachmentsField" ControlMode="Display" FieldName="Attachments" />
</td>
</tr>
You can change the attribute ControlMode to "Edit", it shows the Delete option.

Resources