Yii model update form textfield displayes html encoded value - yii

I am using the following code in my model form view.
echo $form->textField($model,'name',array('size'=>60,'maxlength'=>200));
I have 'services & package' as value for the name field.When i take the update form, the value in the textfield displays as 'services & amp; packages'.
Please help to resolve this issue.

You can disable automatic html encoding by encode html option like below:
echo $form->textField($model,'name',array('size'=>60,'maxlength'=>200,'encode'=>FALSE));

Related

primeng editor source code not working in angular 5

When tried to edit source code in primeng tag, It is only editing one line at a time and without an html showing html tag also.
For example if I write "Text is bold", and when I clicked it on p-editor's ql-code-block
The expected values are to be shown in textarea is < p>< strong>Text is bold< /strong>< /p>.
Actual value shown in textarea is as follows:
Before :
Before selection of ql-code block
After :
After selection of ql-code block
Also after unselecting the ql-code-block button it removes the actual bold font of the text as follows :
After unselection of ql-code block
Please help me out in this.
Thank you in advance :)
If I understand correctly what you are saying, the answer is that you can't have bold in a code-block section (ql-bold or ql-code-block, not both).

Why the field in webbrowser is still consider as empty even I already set its value?

enter image description hereI'm trying to automate our ticketing system using visual basic. However, I can't save the profile because the field in webbrowser is still read as empty even I already set its value:
I also tried to set the attribute originalvalue, prekeyvalue etc. but still not working. But if you manual type the value in the field, it will work.
My code below:
WebBrowser1.Document.GetElementById("mb8a86d99-tb").SetAttribute("value", "EMAIL")
The information of field below:
<input datatype="0" id="mb8a86d99-tb" aria-required="true" role="textbox" aria-labelledby="mb8a86d99-lb" class="fld text fld fld_req" ctype="textbox" li="mb8a86d99-img" maxlength="512" style=";width:225.0px;" async="1" ae="setvalue" type="text" value="" ov="" work="1" fldinfo="{"lookup":"valuelist","dsid":"TSDTKTSOURCE","inttype":"0","afindex":"0","length":"512","required":true}" title="" originalvalue="" prekeyvalue="" stoptcclick="true">
This kind of problem seems to occur in some web pages when the form containing your input does not get activated (it's a form of protection on client-side made to avoid the insertion of values programmatically).
If you manually type the value in it, the form turns active because you're clicking on the input which is a child of the form. However, if you do it programmatically, the activation is not triggered and so the value that you add to the HTML is not taken by the client.
You can try to emulate the activation of the form with the Focus method on your input:
WebBrowser1.Document.GetElementById("mb8a86d99-tb").Focus
WebBrowser1.Document.GetElementById("mb8a86d99-tb").SetAttribute("value", "EMAIL")
If that still doesn't work, try to add a Application.Wait(TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 2)) between one command and the other to let the form the time to actually activate itself.

Want to enter a text into textbox using VBA

want to enter a text into texbox where the tag is input tag, it has ID as well
i am using ie.document.getElementsById("myId").Value = "newtext"
however its giving an error "object doesn't support this property or method"
please give resolution
You can't do it like this. The best way to set the value is to add the attribute "value" to the element:
Example:
ie.document.getElementsById("myId").setAttribute("value", "newtext");
That should work.

How to get a post value in VB.Net

I need help with getting a Value posted from a form in VB.Net.
At the moment there is a form on a php website that is posting 2 values through to me.
name=Max
email=test"test.com
If i was using php i would use :
$name = $_POST['name'];
$email = $_POST['email'];
Now the above fields are now captured within a variable.
How do i do the the same thing in VB.NET
I cannot tell if you are referring to Web text box's or PHP forms but I can help you with Web text box's..
Your question is unclear, but I will try my best.
Assuming you want to get a textbox's value into a variable. You would do like so:
Example Textbox:
<asp:TextBox ID="ExampleTxtBox" runat="server" AutoPostBack="True"></asp:TextBox>
If you want to assign the values on a certain command, for example, a button click. You would put this into the button click handles of the button.
Assuming you want to get the current text/value from the form's text box:
Dim VariableOfTextBox As String 'Creates your Variable
VariableOfTextBox = ExampleTxtBox.text 'Assigns the Value from your Text Box

How to get fillable PDF to prompt for required fields when user saves?

I've created a fillable PDF form using Acrobat 10. I see where you can set form fields to be required, but all that does is outline the fields in red.
How can I get a prompt asking users to enter data in the required fields when they hit save?
You need to use Adobe-JavaScript if you want to achieve this.
Read this page in the Adobe documentation for more details:
Enforcing Required Fields
From that page, the code you have to include in your PDF file will look like this:
f = getField(event.target.name)
if (f.value.length == 0)
{
f.setFocus()
//Optional Message - Comment out the next line to remove
app.alert("This field is required. Please enter a value.")
}
More details about the pop-up alert can be found here:
https://acrobatusers.com/tutorials/popup_windows_part1