[PAID] Oblix Forms | Dynamic Form System

A script by Nick_B2

No reviews yet.
[PAID] Oblix Forms | Dynamic Form System main image

Full Description

Description

Oblix Form is an tool built on the robust Ox lib, empowering server owners with seamless form creation within their server. These dynamic forms can be effortlessly dispatched to Discord through customizable webhooks, opening up a world of possibilities. Furthermore, the script offers the flexibility to send data via client or server events, allowing for customized responses and interactions. The potential applications are vast, ranging from sending emails and applying for departments to redeeming in-game items!

Available on Tebex
:shopping_cart: Tebex https://oblix-scripts.tebex.io/package/5823714
:link: Images: Oblix Forms - Album on Imgur

Target Zones

The script allows you to create as many zones as you’d like.

  • Each zone can have a unique location and size, allowing the script to serve multiple purposes such as applying for department to voting for the next elections!
  • You can restrict the forms to only being accessible by a certain job. Useful for things like reporting officers or logging evidence.
  • All target options are accessible and fully configurable.

Forms

Ability to create as many unique forms as you’d like using a robust and dynamic config.

  • Each form holds a unique name allowing them to be accessed throughout different zones.
  • Customize each form to your liking such as text, number, date inputs, select and multi-select support as well as text areas.
  • Provides the full customization offered with Ox Lib using the dynamic config.
  • Each form can have it’s own unique webhook, empowering you to customize each form to hold it’s own purpose.
    • Ability to change the webhook format through premade templates, or a template you create.
    • Change the webhook title, author, color, footer or add embeded images.

Webhook Customization (per each form)

        webhook = { -- 
            template = 'default', -- Embed template to use, default is default
            url = 'https://discord.com/api/webhooks/123/123', -- Discord webhook url
            title = ':clipboard: New LEO Complaint', -- Webhook title
            color = 255, -- Webhook color
            author = { -- Webhook author and author icon (optional)
                name = 'Author',
                icon_url = 'https://i.imgur.com/image.png', -- Leave blank for only the author name
            },
            footer = { -- Webhook footer and footer icon (optional)
                text = 'Footer',
                icon_url = '',
            },
            image = { -- Webhook embed image (optional)
                url = 'https://i.imgur.com/image.png',
            },
            username = 'Username',
            avatar = 'https://i.imgur.com/image.png',
        },

Events

Don’t fancy having your responses sent to the customizable webhooks? Use events instead.

  • The config allows you to select an alternate destination such as a client, or server event.
  • Possiblity to integrate and create your own events directly in this resource.
  • Examples for both client and server events which allows the possiblity to use the data from the form for alternate purposes such as:
    • Elections
    • Application Forms
    • Integrate into phone systems
    • Redeem items or other things
    • Etc.
        destination = { 
            event = '' -- Name of the event
            source = '' -- server or client
        },

Example using Lb Phone

    RegisterServerEvent('oblix_forms:sendApplications')
    AddEventHandler('oblix_forms:sendApplications', function(data, labels) -- The event takes in two paramaters, the input (data) and the labels from the form.

        local email = data[4] -- Since I modify the email below to become the name of the department in the email, I save the data to be used later on.
        local response = {}
        local order = {}

        --[[
            A simple loop that will build the content of the email and convert the email to the name of the department.
            This is basically just making one big table with all the labels and its respective input. Since the event
            receives the data and labels in the right order, we can be confident that it can be added 1:1 to the table.
        ]]
        for i = 1, #labels do
            local emailToDepartment = {
                ["sasp@sadps.gov"] = "San Andreas State Police",
                ["bcso@saddp.gov"] = "Blaine County Sheriff's Office",
                ["lspd@sadps.gov"] = "Los Santos Police Department",
                ["lsfd@sadps.gov"] = "Los Santos Fire Department",
                ["sams@sadps.gov"] = "San Andreas Medical Services"
            }
            for i = 1, #data do
                local department = emailToDepartment[data[i]]
                if department then
                    data[i] = department
                end
            end
            if data[i] == "" then
                data[i] = "N/A"
            end
            response[labels[i]] = data[i]
            table.insert(order, labels[i])
        end

        -- Convert the table into one long multi-line string for the email. 
        local responseString = ""
        for _, label in ipairs(order) do
            responseString = responseString .. label .. ":\n" .. response[label] .. "\n\n\n"
        end

        -- lb-phone export to send emails.
        local success, id = exports["lb-phone"]:SendMail({
            to = email, -- Email saved earlier before becoming the label
            subject = "New Hire Application",
            message = responseString -- The multi-line string. 
        })

    end)

Dependencies

Oblix Forms is dependent on the following resources:

A B
Code is accessible No
Subscription-based No
Lines (approximately) 500
Requirements Ox Lib / Ox Target or QB Target
Support Yes