Advanced Search

Search by Keyword
Search by User Name
   

Search Options

Find Posts from
Sort Results by
Jump to Result Number
Search in Categories

Search Results

Searched for: show hide
20 Jun 2025 22:38

brian.faries

I have a large, not a multipage, RSForm form with a lot of show/hide interactions, being too much to manage within the Conditional Fields so I have Javascript within 'Form Properties > CSS and Javascript > Javascript' that show/hides what I need and that works correctly.

One thing I am unable to solve is the hidden fields that I am hiding with my own Javascript and not with the Conditional Fields interface are required to not be empty, and when I submit the form with those still being hidden...
Category: RSForm! Pro
09 Apr 2025 12:11

dragos

Hello,

You can find an example on this topic here.
Category: RSForm! Pro
08 Apr 2025 14:25

craigholohan

I am trying to do a similar thing, did you manage to resolve this?
Category: RSForm! Pro
20 Nov 2024 13:14

iceferret

No need to rename the note_uniongaia. The reason that the code appears in your form is simple - the <script> and </script> tags are missing so they just need adding in the rsform javascript section like this

<script>
js code from my reply #43578 goes here
</script>

it should look like this

<script>

// Ensure isInTargetGroups is defined and boolean
if (typeof isInTargetGroups !== 'undefined') {
// Select all parent divs with the classes 'rsform-block-sconto' and 'rsform-block-note-uniongaia'...
Category: RSForm! Pro
20 Nov 2024 11:58

iceferret

A quick amendment, I set up a test form with a few fields and used sconto and note_uniongaia for the hidden if not in user group. The note field stayed visible so I checked the css selector and it's not .rsform-block-note_uniongaia with the underscore but becomes rsform-block-note-uniongaia so amend your javascript to this and it should work for you. if you find the label is above the field and you want them inline change display="block" to display="flex"
// Pass the user group check to...
Category: RSForm! Pro
20 Nov 2024 11:27

iceferret

Lets simplify it a bit, your complete js should look like this, do heck your classes though. I've taken the console log out as we don't need them unless you want them for debugging
// Pass the user group check to JavaScript
document.addEventListener("DOMContentLoaded", function() {
    // Ensure isInTargetGroups is defined and boolean
    if (typeof isInTargetGroups !== 'undefined') {
        // Select all parent divs with the classes 'rsform-block-sconto' and 'rsform-block-note_uniongaia'...
Category: RSForm! Pro
20 Nov 2024 11:06

uniongaiaeventi

i hope i've interpreted it correctly, i'm reporting the code with my ‘sconto’ and ‘note_uniongaia’ fields inserted in the ‘CSS & Javascript’ field. it works for the ‘sconto’ caption while the ‘note_uniongaia’ caption remains displayed. but i'm fully satisfied with the help, i might as well delete it to solve it. thanks

// Pass the user group check to JavaScript
$jsCode = '
<script type="text/javascript">
var isInTargetGroups = ' . json_encode($isInTargetGroups) . ';...
Category: RSForm! Pro
20 Nov 2024 10:28

iceferret

Try this modification of the js which should show/hide the fields show and show2, you should only need to add your own classes in the querySelectorAll in your finished form
document.addEventListener("DOMContentLoaded", function() {
    // Select all parent divs with the classes 'rsform-block-show' and 'rsform-block-show2'
    var fieldContainers = document.querySelectorAll(".rsform-block-show, .rsform-block-show2");
 
    if (fieldContainers.length > 0) { // Ensure there are elements to...
Category: RSForm! Pro
20 Nov 2024 08:58

iceferret

I haven't tested this but amend the Php to check an array of user groups like this which will check if the user is in one or more if the groups
// Get user groups
$userGroups = $user->get('groups');
 
// Define the target group IDs (replace with your actual group IDs)
$targetGroupIds = [8, 12, 15]; // Example group IDs
 
// Check if the user is in any of the target groups
$isInTargetGroups = count(array_intersect($targetGroupIds, $userGroups)) > 0;
 
// Pass the result to the form...

and...
Category: RSForm! Pro
26 Sep 2024 15:54

antonio.cornacchia

Hello
I want completely to disable comments on a page/article, I added {rscomments off} but I don't want to show “Comments are disabled” on the page. Please, how to?
Thanks
Category: RSComments!
04 Sep 2024 09:54

dragos

Hello,

1&2. You can create a backup file of this form, then restore it on your site as explained here.

3. The demo form does not include by default an email message, but you can craft it using the form fields placeholders. As a side note, the result is displayed on the Thank You Page, you'll see it if you'll test the demo RSForm!Pro form. You can also show / hide certain fields based on the user's selection. This is covered here. I can notice in the form that you've provided that there's also...
Category: RSForm! Pro
10 Aug 2024 19:16

stories

It took me a minute to figure this out, so I thought I would share it with people. This is how to get conditions to work when you need to apply them to values taken from calendar fields or text boxes.
  1. Create the text box or calendar field that will trigger the conditions
  2. Create Yes/No radio buttons and set their container as display none with CSS in the CSS section of Form Properties.
  3. Create fields you want to show/hide based on the value of the radio buttons
  4. Create the appropriate conditions for...
Category: RSForm! Pro
21 Jul 2024 08:24

iceferret

That's a two parter but can be done like this. Firstly we need to know the user group of the logged in user so in the php scripts-pre processing section put this
// Get the Joomla user object
$user = JFactory::getUser();
 
// Get user groups
$userGroups = $user->get('groups');
 
// Define the target group ID (replace with your actual group ID)
$targetGroupId = 8; // Example group ID
 
// Check if user is in the target group
$isInTargetGroup = in_array($targetGroupId, $userGroups);
 
//...
...
Category: RSForm! Pro
13 Jun 2024 08:03

andreic

Hello,

Although not an exact example for the username, the following code snippet will show a different message based on the logged in user group:
$user = Joomla\CMS\Factory::getUser();
$groups = $user->get('groups');
$specificGroup = 8; //this is the id of the Super Administrator Group
if(in_array($specificGroup, $groups)) {
echo "User is in the Super Administrator Group";
} else {
echo "User is not in the Super Administrator Group";
}

You can adjust this script to take into account...
Category: RSForm! Pro
12 Jun 2024 23:28

tanyagreen2

Thanks. The first option won't work well for me because the administrative user would be free-hand typing the status too many times in a regular text box and risk bad data. And unfortunately, I don't know basic php, so I am not able to code the second option offered. It's too bad that rsforms does not offer settings on the front end to facilitate basic forms work-flow.

In any case, the example links that were given to me in my tech support ticket were helpful. Although it is not an ideal...
Category: RSForm! Pro
Displaying 1 - 15 out of 404 results.