Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

txtDbValue always hidden #57

Open
thewebartisan7 opened this issue Sep 1, 2020 · 0 comments
Open

txtDbValue always hidden #57

thewebartisan7 opened this issue Sep 1, 2020 · 0 comments

Comments

@thewebartisan7
Copy link

thewebartisan7 commented Sep 1, 2020

There is a reason why the txtDbValue is always hidden?

This https://github.com/InfyOmLabs/generator-builder/blob/master/views/field-template.blade.php#L29

Should be appended to dbType like for htmlType and htmlValue

I can make a PR to:

  1. Make this field .txtDbValue always visible

  2. Add in form submit:

                // Append db value
                var dbType = $this.find('.txtdbType').val();
                // if not empty append
                if($this.find('.dbValue').val())  dbType = dbType + ':' + $this.find('.dbValue').val()

// ...

fieldArr.push({
                    name: $this.find('.txtFieldName').val(),
                    dbType: dbType, // here dbType
                    htmlType: htmlValue,
//...

And I would like to know about relation for each field as in your fields_sample.json there is for example:

    {
        "name": "writer_id",
        "dbType": "integer:unsigned:default,0:foreign,writers,id",
        "htmlType": "text",
        "relation": "mt1,Writer,writer_id,id"
    },

Right now seem not possible to add relation like this for each field, or am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant