I have a pdf fillable form where I am allowing the user to enter additional remarks/comments in a text area.
The issue is that some want to enter hyperlink in the text area, which works fine until the text-area is active. When the form is saved, all fields are made read-only and the hyper-link is not clickable. I tried flattening the page, but even then the link is not clickable.
Is there any way to achieve this?
There are two questions here.
You can add hyperlinks to text field and have them remain functional if the field is set to allow for Rich Text. If the field doesn't allow rich text, any hyperlinks entered will revert back to plain text when the field is exited.
Read-only fields are ignored by the mouse. I'd need to understand more about how the PDF is created and what the rest of your code does to recommend a work around.
Related
I'm creating a staff document which requires only 2 things to be unlocked.
1. A placeholder for an image, I've implemented that just fine by creating a button with "Icon only" and using a javascript code as follows:
// Mouse Up script to import a button icon
event.target.buttonImportIcon();
It works perfectly!
However I also need a text field which can be clicked once, and have text filled in and saved, because quite frankly the people that will be using the document, couldn't edit a PDF if the human race depended on it haha
Any help would be appreciated greatly!!! Thanks!
Create a text field (which I'm assuming you will want to start off as empty) and then add the following command to activate on Mouse Down:
(this.getField("TextFieldName")).value = "The text that you want to add...";
Where TextFieldName is the reference to the text field that you want to auto fill.
This will make the text appear when the text field is clicked. You could add a clear button using similar code so that erroneous clicks can be undone. Also, you could set the field to be read only to prevent unwanted changes to the auto filled text.
That's it.
The web app that I am working on is pretty big and I am not sure whether field can get their types changed.
Anyway,
we have a textarea in a popup that on some text entered and Save button in the popup clicked, moves all the textbox content to an input field of type text.
Later if a user clicks on the input field he gets the popup with the textbox rendered again and the textbox content is obtained from the input.
The issue occurs already at the first shift as all new lines are removed on moving the text from the textarea to the input field.
I have found that the reason for new lines missing is that html requires tags introduced in order to render those, but I have expected the text to keep formatting after getting back to the same textbox.
Why are new-line characters removed from the string?
Do you have any suggestion how to overcome that? I am not sure whether I will be able to change the field types.
Something you could do is, when you save and move the content to the input, you can store the "textarea" value on a javascript variable. Then, when opening the popup again, place the variable value to the textarea, and the formatting will be still there.
I am using a plugin in WP that generates a form based on input in the admin area. I have five fields that are set to url validation and such types appear in a form with a second field for optional link text, meaning if the user enters "http://stackoverflow.com" in the first field they have the option to type "Stackoverflow" in the second, and that is what will appear as the link text in the resulting listing in the web site directory. If the user leaves this field empty, the plugin will insert the url from the first field to fill it.
I have set these links to be styled as buttons, thus I need to control what appears on them so they are the right size. I want to add specific default text to each of these five fields, but I can't edit the form because it is generated dynamically.
One of these input fields for optional text is coded thus:
<input type="text" id="wpbdp-field-12-title" name="listingfields[12][1]" class="intextbox" value="" placeholder="">
Is there a way to use css or javascript or magic to insert text in the fields so it is submitted with the form? I want one, for example, to have the default text "Official Website" and other to read "Facebook" and so forth.
BTW, this field will be hidden by css so the form filler doesn't alter it. I just need these fields pre-filled to save labor by the admin.
Thank you, all.
Are you sure there is no way to edit the input in the plugin you're using? If you wanted you can change it after the page load with the jQuery included in WP.
CODE
$(function() {
$('input#wpbdp-field-12-title').attr('value','your additional value text');
});
this is really not a full proof way of doing it as the plugin you use will change the ID of the field if you edit it in the future. Maybe look into using a different one or making your own php form.
EDIT
You could also have inputs with values predefined that are hidden and submitted along with it. I'm not sure if thats a possiblity for you.
I have a lot on my site text boxes whose content is a date
So I will not have to check correctness did it read-only
Until now next to each text box was two buttons, one to add date opened popup calendar, second to delete the date (values not required)
Now I wanted to go to ajax calendarextender that the buttons were just ugly
My problem is that this control is not have delete button, and I do want to allow the user to deleted but not cancel the properties read-only to text box And I do not want to leave the ugly button.
My question:
If calendarextender ajax or something similar with a delete button from the popup
Alternatively if you have the option text box with a delete button inside( as text boxes IE10)
With the help of css and java-script you can easily do it.
Here is an example How do I put a clear button inside my HTML text input box like the iPhone does?
Instead of all that work to make it read-only and avoid validation, why not combine a FilteredTextBoxExtender with the CalendarExtender. Use the filter to block all non-numeric characters. I still think it's better to do the validation. It's as simple as DateTime.TryParse(), or you could do it client-side with the built-in FieldValidators.
I'm creating a website where users will be posting text. One of the text boxes on the "posting" page is for tags/hashtags. A user will type in this text box "#food" or "food", but as soon as they hit the space bar, I would like each of those words typed to be hyperlinked.... which after posted, will be displayed on the post as a hyperlinked tag for other users to click on.
ie. JUST like the "Tags" box here on stackoverflow as I'm posting this question.
Does anyone know how to make a text box capable for this?
Don't use inline objects for that. Instead use an editable div;
<div id="myInputBox" contenteditable="true"></div>
You can also make your input-box of a block-type, but I'm not sure if all browsers will abide by those rules of inserting complex markup inside the tag then.