Changes for page Form Builder

Last modified by Sachin Patil on 2024/08/30 07:28

From version 20.1
edited by Admin
on 2023/08/03 14:35
Change comment: There is no comment for this version
To version 16.1
edited by rijo
on 2022/12/07 07:21
Change comment: introduced heading for the Extra Script/Style sample code; introduced sample code for hidding options in form

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Admin
1 +XWiki.rijo
Content
... ... @@ -250,44 +250,10 @@
250 250  (% style="margin-left: 80.0px;" %)
251 251  b. Please [[click here>>attach:formbuilder-R-PaintBrush-Aug23.mp4]] to view a video showing how a button's background color was changed.
252 252  
253 -(% style="margin-left: 80.0px;" %)
254 254  \\
255 255  
256 -(% style="margin-left: 80.0px;" %)
257 -\\
255 +TEMPLATES MENU
258 258  
259 -===
260 - ===
261 -
262 -{{id name="click-thru-button"/}}
263 -
264 -===
265 - ===
266 -
267 -{{id name="click-thru-button"/}}
268 -
269 -=== Click-Thru Button ===
270 -
271 -Often users will want to create a pop-up or landing page that has a button that clicks through to another site or page. The specific use-case could be clicking to a partner site to download a digital edition, clicking to a non-ONEcount form, or clicking off-site to a thid-party application.
272 -
273 -To create a click-thru button, click in the cell or grid where you want the button to appear, and from the tool-bar on the right, select Form Options, and then Submit. ONEcount will place a button on your form.
274 -
275 -[[image:attach:submit-button-tool.png||thumbnail="true" height="250"]]
276 -
277 -\\
278 -
279 -Now click on the button, and click on the gear icon above the tool bar.
280 -
281 -[[image:attach:click-thru-button.png||height="250"]]
282 -
283 -Click on the Action Pull-down and select Clickthrough. In the box for Label, add whatever text you would like to appear on the button. In the URL box, put the full URL where you would like the user to be sent when they click on the button. Please note that this URL will open in a new window, leaving the pop-up on the screen. The user will need to close the pop-up.
284 -
285 -A future version of ONEcount will track these click-throughs as "completions" in both the form and segment analytics, giving you insights into how many people are clicking through to the URL.
286 -
287 -\\
288 -
289 -=== TEMPLATES MENU ===
290 -
291 291  The Templates menu contains a set of four pre-designed set of templates you can choose from. Clicking on the Templates option, (found on the right-hand panel) displays the template set.
292 292  
293 293  [[image:attach:TEMPLATES menu Aug22.png||thumbnail="true" height="250"]]
... ... @@ -536,7 +536,7 @@
536 536  
537 537  = ADVANCED FORM TECHNIQUES: =
538 538  
539 -With Extra Scripts/Extra Styles, you can add features to your form or popup to enhance its look-and-feel as well as operations.  Following are examples of how this can be achieved.
505 +With Extra Scripts/Extra Styles, you can add features to your form or popup to enhance its look-and-feel as well as features.  Following are examples of how this can be achieved.
540 540  
541 541  \\
542 542  
... ... @@ -619,28 +619,28 @@
619 619  
620 620  \\
621 621  
622 -**Example:** A form contains a collection of questions.  The client decides that a question/option needs to be done away with, but without disturbing the rest of the form. You want to have it removed or hidden.  You can make this field invisible without changing anything else about the form, using the Extra Script option.  Without re-designing the form, we are able to remove the unwanted option by using the sample code below. 
588 +**Example:** A form contains a collection of questions.  If the need to get rid of a question or option, you may want to have it removed.  You can make this field invisible without changing anything else about the form, using the Extra Script option.  Without re-designing the form, we are able to remove the unwanted option by using the sample code below. 
623 623  
624 624  \\
625 625  
626 626  **Example Sample Code:**
627 627  
628 -(% class="p1" %)
594 +(% class="p1" style="" %)
629 629  var removeId = document.getElementsByClassName("labelId");
630 630  
631 -(% class="p1" %)
597 +(% class="p1" style="" %)
632 632  for(var i = 0; i < removeId.length; i++){
633 633  
634 -(% class="p1" %)
600 +(% class="p1" style="" %)
635 635  if(removeId[i].innerText(% class="apple-converted-space" %)  (%%)== "RemoveMePlaceHolder"){
636 636  
637 -(% class="p1" %)
603 +(% class="p1" style="" %)
638 638  removeId[i].parentNode.style.display="none";
639 639  
640 -(% class="p1" %)
606 +(% class="p1" style="" %)
641 641  }
642 642  
643 -(% class="p1" %)
609 +(% class="p1" style="" %)
644 644  }~/~/end of for loop
645 645  
646 646  \\
... ... @@ -648,24 +648,24 @@
648 648  **Steps:**
649 649  
650 650  * Initialize a variable to grab all the instances of the id from the form you want hidden. 
651 -** var removeId = document.getElementsByClassName("labelId"); //(notice the semi-color)//
652 -** removeId: name of variable (//you can choose a name of your choice, but remember to be consistent with the use through the code//)
617 +** var removeId = document.getElementsByClassName("labelId");
618 +** removeId: name of variable (you can choose a name of your choice, but remember to be consistent with the use through the code)
653 653  ** labelId: replace this with the id of the field you want checked/removed
654 654  ** getElementsByClassName: property of javascript that allows you to get elements by the class name property
655 655  * Traverse through the array of the gathered instances (of removeId), and check for the corresponding text by comparing the innerText property to  "RemoveMePlaceHolder"
656 -** removeId[i].innerText(% class="apple-converted-space" %)  (%%)== "RemoveMePlaceHolder" (//check for matches//)
622 +** removeId[i].innerText(% class="apple-converted-space" %)  (%%)== "RemoveMePlaceHolder" (check for matches)
657 657  ** RemoveMePlaceHolder: replace this with the text you want hidden
658 658  * If a match is found, then grab its parentNode
659 659  ** removeId[i].parentNode
660 -** [i] is the index of the array where the match was found, during traversal
626 +** i is the index of the array where the match was found
661 661  * Change the style of the parentNode to display it as none.  This keeps the field hidden in your forms.
662 -** removeId[i].parentNode.style.display="none"; (//notice the semi-color//)
628 +** removeId[i].parentNode.style.display="none";
663 663  
664 664  \\
665 665  
666 666  **Note:**
667 667  
668 -* All the code must be included in the form Extra Script field.
634 +* All the code must be included in form extra script area.
669 669  * The code is to be inserted in the forms in which the value need not been shown or hidden
670 670  
671 671  = DYNAMIC/PROGRESSIVE LOOK-UP: =
Confluence.Code.ConfluencePageClass[0]
id
... ... @@ -1,1 +1,1 @@
1 -103120946
1 +77496616
url
... ... @@ -1,1 +1,1 @@
1 -https://info.onecount.net//wiki/spaces/OD/pages/103120946/Copy of New Form Builder
1 +https://info.onecount.net//wiki/spaces/OD/pages/77496616/Copy of New Form Builder