I need to open a modal window or popup from a SharePoint site column, when the user clicks on a link shown by this column.
I have tried to use these types of site columns:
Full HTML content with formatting and constraints for publishing
Hyperlink with formatting and constraints for publishing
but I don't know how exactly to use them. What should I put as content? I have tried this code from C# but that does not work:
private LinkFieldValue linkField = new LinkFieldValue();
linkField.NavigateUrl = "javascript:window.open('Pages/delete.aspx?Id='" + id +",width='300',height ='300', toolbar='no')";
linkField.Text = "Delete";
linkField.UseDefaultIcon = true;
linkField.ToolTip = "Delete";
Related
I am trying here the QuickView form of MS Dynamics CRM. The text fields are under IFrame. Through the below java script, it's accessible: fname
//enter fname value
browser.executeScript("window.onload = document.getElementById('NavBarGloablQuickCreate').contentWindow.document.getElementById('firstname_i').value = 'rupam'"); But only first name is selected, if we try to do for the rest fields, it's not working. Hence, decided to do it through protractor code,
// Swtich to iFrame
browser.switchTo().frame(element(by.id("NavBarGloablQuickCreate")));
// Setting anme in first name text field
element(by.id('firstname_i')).sendKeys('Indra');
But here, it says element is not contactable.
You almost had it but were missing the .getWebElement() from your switchTo line. This is required as per the protractor documentation.
// Switch to iFrame
browser.switchTo().frame(element(by.id("NavBarGloablQuickCreate")).getWebElement());
//set name
element(by.id('firstname_i')).sendKeys('Indra');
Can you try the below and let me know.
I am also facing same issue to work with Dynamics CRM Quick view forms.I am trying to set a values on different fields of Quick view forms using SendKeys().But the value is not showing and cursor is not moving from one control to anaother.I have tried to move TAB using protractor TAB values also.But it's not showing.
I am trying to implement file attachment to my AEM Form. The idea is to embed the attachment to the PDF; Upon submission of the PDF, the backend system will be able to extract the attached file from the PDF.
I can't seem to find any example on how I can go about doing it, which make me wonder is it a limitation. However, on adobe site below, it is actually stated "Support for file attachments" for all AEM form types.
https://helpx.adobe.com/aem-forms/6/introduction-aem-forms.html
Please advice! Thanks!
You can upload, preview, and submit attachments with HTML5 forms. By default, the attachment support is disabled. To enable the attachment support:
1- Create a custom profile with mutiselect string property mfAttachmentOptions.
2- In the custom profile, specify properties fileSizeLimit, multiSelect, and buttonText to configure options of the file attachment widget. As required, you can also specify more custom properties.
3- In the custom profile, use the following configurations:
multiSelect -> true or false (true by default)
fileSizeLimit -> value_in_mb (say 5) (2 MBs by default)
buttonText -> Button text for pop-up window ("Attach" by default)
accept -> file types to accept ("audio/, video/, image/, text/, .pdf" by default)
4- Use the metadata editor to select the custom profile that you have created above for HTML 5 forms.
5- Render your form template with custom profile and the attachments icon would appear on the forms toolbar.
6- Click the attachment icon, an attachment selection dialog box appears. Browse and select the attachment and click Attach.
When attachments are enabled, HTML5 form submits multipart data. The mutli-part submission data has two parts dataXml and attachments.
Reference: https://helpx.adobe.com/aem-forms/6-1/html5-forms/enabling-attachments-html5-form.html
Below is the code for "Add Attachment" button.
var oDoc = event.target;
var doccount = parseInt(colhead.attcount.rawValue);
colhead.attcount.rawValue = doccount + 1;
Trusted_ImportDataObject(oDoc, doccount);
var oAttachment = oDoc.getDataObject("attachment_" + doccount);
var DOsize = oAttachment.size;
var DOmimeType = oAttachment.MIMEType;
if (DOmimeType == null) DOmimeType = "reject";
if ((DOsize > 1100000) || (DOmimeType.indexOf("image/") != 0)) {
xfa.host.messageBox("Attachemtns must be an image and smaller than 1 Megabyte");
oDoc.removeDataObject("attachment_" + doccount);
} else {
var attachPath = oAttachment.path;
AttachFileName.rawValue = attachPath;
AttachMIMEType.rawValue = oAttachment.MIMEType;
AttachHref.rawValue = oAttachment.name;
}
Do note that Reader Extension is needed to enable file attachment. Else you will be getting this error:
NotAllowedError: Security settings prevent access to this property or method.
Doc.importDataObject:6:XFA:CTR[0]:Page6[0]:part6[0]:body[0]:attachitem[0]:AddAttachment[0]:click
I need help with powermail.
I'm using Typo3 6.2.4 and powermail 2.0.16.
Something is wrong cause nothing appear in the frontend, but I don't what and I need some helps.
I created a new root page with the basic template "HELLO WORLD!" (ID = 15).
# Default PAGE object:
page = PAGE
page.10 = TEXT
page.10.value = HELLO WORLD!
In this template, I included two statics templates : "Main Template (powermail)" and "Add basic CSS (powermail)"
After that, in the root page, I created the folder "Powermail" to stock the data. (ID = 241)
And I created a second folder ("Form"; ID = 242).
In the folder "Form", I created a new Form ("registration") with the setting : Layout=Layout1; Language=Default; And the checkbox "Hide" is not checked
In this one, one Pages ("registration data") with the setting : Layout=Layout2; Language=Default; And the checkbox "Hide" is not checked
In "registration data", two fields, one for the name (Name of the sender) and one for the mail (Email of the sender) with setting : Mandatory Field=Checked; Layout=Layout3; Language=Default; And the checkbox "Hide" is not checked
And after that, in the root page, I created a new content element "powermail".
In the tab General, I set the header = Registration
In the tab Plugin, I selected Powermail. After, this is the setting : Selected Items=registration; Confirm page=checked;
Receivers Name=My Name; Receivers Email=MyName#gmail.com; Subject=My test;
Sender Name=A Name; Sender Email=AName#gmail.com; Subject=test;
In the tab Behaviour, Recursive=0 levels;
It seems that you are missing the proper typoscript to actually show the form on the page.
The specified typoscript snippet is not enough to show the content elements on the page.
Inside your typoscript template include the css_styled_content static template and change the snippet to this:
# Default PAGE object:
page = PAGE
page.10 < styles.content.get
That should ensure proper showing on the frontend. This is basic as it is, if you want it to be better looking, or different templating you should take a look at templating with TYPO3 first.
Here I want to set the already exist PDF document properties under Initial View tab in acrobat.
Document Options:
Show = Bookmarks Panel and Page
Page Layout = Continuous
Magnification = Fit Width
Open to Page number = 1
Window Options:
Show = Document Title
As show in below screen shot:
I am tried following code:
PdfStamper stamper = new PdfStamper(reader, new FileStream(dPDFFile, FileMode.Create));
stamper.AddViewerPreference(PdfName.DISPLAYDOCTITLE, new PdfBoolean(true));
the above code is used to set the document title show.
But following code are not working
For Page Layout:
stamper.AddViewerPreference(PdfName.PAGELAYOUT, new PdfName("OneColumn"));
For Bookmarks Panel and Page:
stamper.AddViewerPreference(PdfName. PageMode, new PdfName("UseOutlines"));
So please give guide me what is the correct way to meet my requirement.
I'm adding an extra answer in answer to the extra question in the comments of the previous answer:
When you have a PdfWriter instance named writer, you can set the Viewer preferences like this:
writer.ViewerPreferences = viewerpreference;
In this case, the viewerpreference is a value that can have one of the following values:
PdfWriter.PageLayoutSinglePage
PdfWriter.PageLayoutOneColumn
PdfWriter.PageLayoutTwoColumnLeft
PdfWriter.PageLayoutTwoColumnRight
PdfWriter.PageLayoutTwoPageLeft
PdfWriter.PageLayoutTwoPageRight
See the PageLayoutExample for more info.
You can also change the page mode as is shown in the ViewerPreferencesExample. In which case the different values are "OR"-ed:
PdfWriter.PageModeFullScreen
PdfWriter.PageModeUseThumbs
PdfWriter.PageLayoutTwoColumnRight | PdfWriter.PageModeUseThumbs
PdfWriter.PageModeFullScreen | PdfWriter.NonFullScreenPageModeUseOutlines
PdfWriter.FitWindow | PdfWriter.HideToolbar
PdfWriter.HideWindowUI
Currently, you've only used the PrintPreferences example from the official documentation:
writer.AddViewerPreference(PdfName.PRINTSCALING, PdfName.NONE);
writer.AddViewerPreference(PdfName.NUMCOPIES, new PdfNumber(3));
writer.AddViewerPreference(PdfName.PICKTRAYBYPDFSIZE, PdfBoolean.PDFTRUE);
But in some cases, it's just easier to use:
writer.ViewerPreferences = viewerpreference;
Note that the official documentation is the book "iText in Action - Second Edition." The examples are written in Java, but you can find the C# version here. There is a new book in the works called "The ABC of PDF", but so far only 4 chapters were written. You'll find more info here: http://itextpdf.com/learn
The part about the different options to create a PdfDestination is already present in "The ABC of PDF".
As for setting the language, this is done like this:
stamper.Writer.ExtraCatalog.Put(PdfName.LANG, new PdfString("EN"));
The result is shown in the following screen shot:
As you can see, there is now a Lang entry with value EN added to the catalog.
The two items Show = Bookmarks Panel and Page and Page Layout = Continuous are controlled one layer up from the ViewerPreferences in the document's /Catalog. You can get to this via:
stamper.Writer.ExtraCatalog
In your case you're looking for:
// Acrobat's Single Page
stamper.Writer.ExtraCatalog.Put(PdfName.PAGELAYOUT, PdfName.ONECOLUMN);
// Show bookmarks
stamper.Writer.ExtraCatalog.Put(PdfName.PAGEMODE, PdfName.USEOUTLINES);
The items Magnification = Fit Width and Open to Page number = 1 are also part of the /Catalog but in a special key called /OpenAction. You can set this using:
stamper.Writer.SetOpenAction();
In your case you're looking for:
//Create a destination that fit's width (fit horizontal)
var D = new PdfDestination(PdfDestination.FITH);
//Create an open action that points to a specific page using this destination
var OA = PdfAction.GotoLocalPage(1, D, stamper.Writer);
//Set the open action on the writer
stamper.Writer.SetOpenAction(OA);
A form populates and the OnLoad event tests for the value in a field. If that value is blank, then I want a hyperlink to appear in place of the textbox which I have figured out. The hyperlink needs to link to another form within the database which is my question.
Take the following snippit:
If cp = "" Then
Forms[!MyForm]![MyTextControl] = "Update"
Forms[!MyForm]![MyTextControl].IsHyperlink = True
' what is the code to add the link to the other form
Else
Forms[!MyForm]![MyTextControl] = cp
End If
Any thoughts on how to create a hyperlink that links to another form?
The text for a hyperlink in a textbox is:
="Form##form table1_form#This will open a form#"
="Display text#Address if required#sub address, eg form or report#screen tip#"