Git Product home page Git Product logo

Comments (3)

antoniojlm84 avatar antoniojlm84 commented on September 26, 2024

Hi

Any new about this request? I think it would be nice to have this feature too!

Thanks!

from quillforms.

mdmag avatar mdmag commented on September 26, 2024

@antoniojlm84
For React version we have the messages key in formObj prop that can customize the messages.
Please read this doc:
https://github.com/quillforms/quillforms/blob/master/react-docs/get-started.md

from quillforms.

giovabiancia avatar giovabiancia commented on September 26, 2024

Resolved like this with react-18n

<Form
        formId={formId}
        formObj={{
          blocks: blocks,
          theme: {
            font: "Roboto",
            buttonsBgColor: "#01358d",
            questionsColor: "#000",
            answersColor: "#5b6880",
            buttonsFontColor: "#ffff",
            buttonsBorderRadius: 25,
            errorsFontColor: "#fff",
            errorsBgColor: "#f00",
            progressBarFillColor: "#ffff",
            progressBarBgColor: "#01358d",
          },
          messages: {
            "label.button.ok": t("general_ok"), // Default: 'Ok'
            "label.hintText.enter": t("general_enter"), // Default: "press <strong>Enter ↵</strong>",
            "label.hintText.multipleSelection": t(
              "general_choose_as_many_as_you_like"
            ), // Default: "Choose as many as you like"
            "block.dropdown.placeholder": t("general_type_select_option"), // Default: "Type or select an option"
            "block.dropdown.noSuggestions": t("general_no_suggestions"), // Default: "No Suggestions!"
            "block.shortText.placeholder": t("general_type_answer_here"), // Default: "Type your answer here"
            "block.longText.placeholder": t("general_type_answer_here"), // Default: "Type your answer here"
            "block.longText.hint": t("general_hint_space"), // Default: "<strong>Shift ⇧ + Enter ↵</strong> to make a line break"
            "block.number.placeholder": t("general_type_answer_here"), // Default: "Type your answer here"
            "block.email.placeholder": t("general_email_here"), // Default: "Type your email here"
            "block.defaultThankYouScreen.label": t("general_thanks_submitting"), // Default: "Thanks for filling this in.\n\n We will contact you soon"
            "label.hintText.key": t("general_key"), // Default: "Key"
            "label.progress.percent": t(
              "general_percent_competed",
              "progress:percent"
            ), // Default: "{{progress:percent}}% completed"
            "label.errorAlert.required": t("general_error_field_required"), // Default: "This field is required!"
            "label.errorAlert.date": t("general_error_invalid_date"), // Default: "Invalid date!"
            "label.errorAlert.number": t("general_error_numbers_only"), // Default: "Numbers only!"
            "label.errorAlert.selectionRequired": t(
              "general_error_one_selection"
            ), // Default: "Please make at least one selection!"
            "label.errorAlert.email": t("general_error_invalid_email"), // Default: "Invalid email!"
            "label.errorAlert.url": t("general_error_invalid_url"), // Default: "Invalid url!"
            "label.errorAlert.range": t("general_error_range", {
              min: "attribute:min",
              max: "attribute:max",
            }), // Default: "Please enter a number between {{attribute:min}} and {{attribute:max}}"
            "label.errorAlert.minNum": "minNum", // Default: "Please enter a number greater than {{attribute:min}}"
            "label.errorAlert.maxNum": "maxNum", // Default: "Please enter a number lower than {{attribute:max}}"
            "label.errorAlert.maxCharacters": t(
              "general_error_maximum_characted"
            ), // Default: "Maximum characters reached!"
            "label.submitBtn": t("general_submit"), // Default: "Submit"
          },
        }}
        onSubmit={(
          data,
          { completeForm, setIsSubmitting, goToBlock, setSubmissionErr }
        ) => {
          console.log("SUBMITTED", data);
          onSubmit(data);
        }}
      />

from quillforms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.