Home › Forums › Quform WordPress › Setting a value to a div in a html field
- This topic has 7 replies, 2 voices, and was last updated 1 year, 5 months ago by Ally.
- AuthorPosts
- May 30, 2023 at 8:42 pm #35539oivanrParticipant
Hi
I have a plugin that use a pre-display filter.
The form that I have (e.g. Number 7) has inside and html field (e.g. 1_7) in this html there is this code
<section id=”resultado”></section>.
What I am trying to do is set a value from the php plugin pre-display filter
I tried this:
$salida = $form->getElement(“quform_1_7 #resultado”);
And this
$salida = $form->getElement(“quform_1_7”);
and this
$salida = $form->getElement(“#resultado”);And after get the element, I assign a value throw this
$salida->setValue(“Any value”);
But php gave an error.
Can you help me to fix this? PleaseMay 31, 2023 at 9:02 am #35541AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 31, 2023 at 9:21 pm #35544oivanrParticipantHi Ally,
It works almost fine. The issue now is that I have some css configuration that is not working with with this code, and, when I write the section inside the form, works (the css configuration) perfectly.
Any idea?
Thanks in advanceJune 1, 2023 at 9:34 am #35546AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
June 2, 2023 at 2:03 am #35548oivanrParticipantHi Ally,
I am working in a localhost so I can’t send the link, but I have no problem with sending you the css code.
Must tell you I am using a Kadence theme.
I am attaching a couple of images: searchForm_1 is when the page (in wordpress) load with the form. (Remember that form has an html field with a section inside which id is “resultado”), here the display is a mess.
The searchForm_2 presents the search already done with the form.
Thanks for your help.This is the scss code. If you prefer the css I can send you.
Line 61 is the “cardGratis” format, the box with the black border and white background.
Line 29 is the “card” format, the box the acqua background.01 /* Declaro variables para colores */
02 :root{
03 –azul: #1e8cfa;
04 //–acqua: hsl(159, 96%, 40%);
05 –acqua:#22c1c3;
06 –gris: rgba(128, 128, 128, 0.767) ;
07 –blanco: hsl(0, 0%, 100%);
08 –acqua-claro: #22c0c333;
09 –negro:black;
10 }
11
12 // Hago que todo se comprima al tamaño de la caja
13 html {
14 box-sizing: border-box;
15 }
16
17 // todos los elementos previos y posterior adoptan esa propiedad
18 *, *:before *:after{
19 box-sizing: inherit;
20 }
21
22 .contenedor{
23 display: grid;
24 gap: 1rem;
25 grid-auto-flow: dense;
26 grid-template-columns: repeat(auto-fill,minmax(min(100%,20rem), 1fr));
27 }
28
29 .card {
30 background-color: var(–acqua-claro);
31 padding: 5px;
32 text-align: center;
33 border-radius: 10px;
34 box-shadow: 1px 2px 5px gray;
35
36 &-header {
37 border-bottom: 2px solid var(–acqua);
38 }
39
40 &-body{
41 font-size: medium;
42 padding-left: 2rem;
43 text-align: left;
44 border-bottom: 2px solid var(–acqua);
45 p {
46 font-size: smaller;
47 }
48 }
49
50 &-footer{
51 background-color: var(–acqua);
52
53 &-enlace {
54 color: white;
55 text-decoration:none;
56 }
57 }
58
59 }
60
61 .cardGratis {
62 //background-color: var(–gris);
63 width: 300px;
64 height: 100px;
65 padding: 3px;
66 text-align: center;
67 border-radius: 10px;
68 border: 1px solid black;
69 box-shadow: 1px 2px 5px gray;
70 box-sizing: border-box;
71
72 &-header {
73 border-bottom: 2px solid var(–negro);
74 }
75
76 &-body{
77 font-size: small;
78 padding-left: 2rem;
79 text-align: left;
80 p {
81 font-size: smaller;
82 }
83 }
84
85 }
86
87 // para quforms
88 /* Fix UI issue for readyonly field */
89 .qfb-settings input[type=text][readonly]{
90 cursor: not-allowed;
91 }
92 .qfb-settings input[type=text][readonly]:focus {
93 cursor: not-allowed;
94 }Attachments:
You must be logged in to view attached files.June 5, 2023 at 9:32 am #35559AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
June 8, 2023 at 7:15 am #35572oivanrParticipantHi Ally,
I found the problem. I am attaching an image. What I did was to switch off the button of the Auto formatting.
Thanks for your help,Attachments:
You must be logged in to view attached files.June 8, 2023 at 9:36 am #35574AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.